Egor's blog

By Egor, history, 2 years ago, In English,

I would really appreciate any new ideas of what new features to add

I would also appreciate donations: Yandex.Money, PayPal

4.1.8

  • All parsers are up to date
  • GCJ and Kattis are now only parsable from Chrome extension

4.1.5

  • Added parsing for AtCoder and CSAcademy
  • Fixed parsing for HackerRank
  • Fixed enums in switches

4.1.3

  • Various fixes for code generation

4.1.2

  • Cojac version update. If you use Cojac for your own configurations update agent parameters as follows:
-Cints -Clongs -Ccasts -Cmath
  • Cleanup
  • Switched to Java 1.8
  • Timus parser fix
  • Kattis parser fix
  • Include all Kattis sites

4.1.1

HackerEarth support


4.0.11

Fixed issue with using method as functional interface


4.0.10

Fix for USACO parsing. Currently on beta channel

 
 
 
 
  • Vote: I like it  
  • +33
  • Vote: I do not like it  

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What was the key to speedup, if it's not a secret?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Adding instead of removing

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Thanks.

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it +8 Vote: I do not like it

        Long answer is previously I added everything that was imported from task class and everything in the same package, then everything that is imported from those classes and so on, and then removing unused code which is slow and cyclic references may remain. Now I only add what is actually referenced. Among other things now you can reference classes by fqn instead of importing them. Moreover naming conflict would be handled by constructing other names for classes

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      -_-

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks you very much, your plugin is very helpful. :D

»
2 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
2 years ago, # |
  Vote: I like it -6 Vote: I do not like it

Hi Egor, I got this error after update CHelper and run my task. Can you give me an advise?

NoSuchMethodError: com.intellij.psi.PsiType.getTypeByName(Ljava/lang/String;Lcom/intellij/openapi/project/Project;Lcom/intellij/psi/search/GlobalSearchScope;)Lcom/intellij/psi/PsiClassType;: com.intellij.psi.PsiType.getTypeByName(Ljava/lang/String;Lcom/intellij/openapi/project/Project;Lcom/intellij/psi/search/GlobalSearchScope;)Lcom/intellij/psi/PsiClassType;

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    What is the version of Intellij Idea that you use?

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

e-olimp support is broken?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, they redesigned. I am not sure I am inclined to fix it myself, but if anyone willing I gladly accept PR

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      and Kattis also? :(

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Kattis is working for me

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Strange, it's not working for me. I just get the "Nothing to show" message in the problem list. I already hit the "Refresh" button a few times and waited for a few minutes. The other judges work OK. Any hints?

          I have IDEA 14, CHelper 4.0.1, running in Fedora 20 with Oracle JDK, in case it helps.

          • »
            »
            »
            »
            »
            »
            2 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Probably fix to suppress certificate warnings is not working on Fedora. You can just use Chrome plugin instead

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello,

I recently tried to run TopCoder on C-Helper. However, when I try to run in Intellij Idea, it gives me an null pointer exception, and I can't compile it on Topcoder Arena. Is there anything I have to install other than CHelper and Arena? There error I've got in Idea is:

null java.lang.NullPointerException at net.egork.chelper.codegeneration.SolutionGenerator.shouldAddElement(SolutionGenerator.java:338) at net.egork.chelper.codegeneration.SolutionGenerator.processElement(SolutionGenerator.java:314) at net.egork.chelper.codegeneration.SolutionGenerator.createInlinedSource(SolutionGenerator.java:63) at net.egork.chelper.codegeneration.SolutionGenerator$4.run(SolutionGenerator.java:502) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:931) at net.egork.chelper.codegeneration.SolutionGenerator.createSourceFile(SolutionGenerator.java:496) at net.egork.chelper.configurations.TopCoderConfiguration.getState(TopCoderConfiguration.java:63) at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:201) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:58) at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31) at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:53) at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31) at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:94) at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:396) at com.intellij.execution.impl.ExecutionManagerImpl.access$400(ExecutionManagerImpl.java:61) at com.intellij.execution.impl.ExecutionManagerImpl$5.run(ExecutionManagerImpl.java:384) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request$1.run(Alarm.java:351) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:702) at java.awt.EventQueue$3.run(EventQueue.java:696) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:719) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:569) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I'm really sorry for writing here. It seems like not a right location to post. Any help is appreciated. Thank you.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Can you zip your project with task in question and send to egor at egork dot net?

»
23 months ago, # |
  Vote: I like it +12 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
23 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
23 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you change archive directory's structure to something simple like this:

Topcoder

  • SRM 660
  • SRM 661
  • ...

Codeforce

  • Round 300
  • Round 301
  • ...
  • »
    »
    23 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Probably I'll add customizeable archive structure in some future version

»
20 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
16 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
16 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Where can I download v4 ? I can only find v3 here ?

  • »
    »
    8 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    You can install it through Jetbrains plugin repository

    • »
      »
      »
      8 months ago, # ^ |
      Rev. 2   Vote: I like it +10 Vote: I do not like it

      Can you please update CHelper to 4.1.5 on GitHub? I am using a modified version of CHelper (changed the codegen template slightly), that's why I need the source code for update.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Two issues(version 4.1.5): (1) Codechef not listed in Parse Contest dialog. (2) Problem parsing broken for codechef. Getting "Connection problems or format change".

I was able to fix (1) by adding codechef parser to Parser.PARSERS. Please help for (2). Trying codechef november long challenge 2016.

»
6 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi, Egor, When the Test Type is 'Number of tests known', Can I use separate threads to run every single test? Thanks for the amazing plugin.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

codechef is not showing up in parse contest

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Codechef can be parsed through chrome extension

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      but some problems are still unable to parse in competitions, and problems in domains can't be parsed through plugin

      • »
        »
        »
        »
        5 months ago, # ^ |
          Vote: I like it +10 Vote: I do not like it

        Because codechef has no fixed format for problem statements. So I use set of heurystics, which not laways work

        • »
          »
          »
          »
          »
          5 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          no problem sir, still a helpful plugin

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi! Can I manually create Topcoder task by using CHelper? Thanks :D

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Egor (previous revision, new revision, compare).

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Egor — Unfortunately, I've had some trouble using the parser. You can see my directory and my settings here:

When I attempt to parse a contest, I'm met with the "Nothing to show" screen found here:

When I try to parse an individual problem using the Chrome extension, I see the circle animation on Chrome, but nothing happens on IDEA. (IDEA is open and the project is loaded.)

Do you have any idea what could cause this issue? Many thanks for any response.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Well, not being aboe to parse from idea seems like idea do not have access to internet. Not being able to parse with chrome is likely something to do with idea not able to connect on localhost port. Do idea runs in some kind of sandbox?

    • »
      »
      »
      2 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      That sounds like a likely cause of the issue. IDEA is running on a basic Windows installation. I've tweaked the firewall a bit but haven't had any luck there. Any ideas about what could be causing the issue? Is it possible that the wi-fi configuration is at fault?

      Thanks for the assistance!

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Just posting a quick reminder since it's been a couple days since last response. No worries if we can't figure it out, but any thoughts you could provide would be much appreciated. I tested it on a different computer without the same firewall software, so I have to imagine that it's somehow related to the wi-fi.

      Thanks for any assistance!

      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I really have no idea what's wrong

        • »
          »
          »
          »
          »
          7 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Understood, I'll see what I can do. I'll post here if I find a solution in the hope that any others with the same problem can benefit.

        • »
          »
          »
          »
          »
          7 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          For anyone else with the same issue, I managed to fix it by updating IntelliJ to the latest version. I searched around and found some errors related to an IntelliJ TransactionGuard class, and in case the class was broken, I updated IntelliJ, after which the program worked.

          Many thanks for your assistance and for creating the plugin.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I see there's an option to parse entire contest in Idea plugin, but the Chrome extension seems to activate only on a single problem page. Am I missing something or the extension doesn't support contest parsing? That looks weird.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Chrome parser only works with single page so it just can't parse whole contest at once. One exception is Google Code Jam because all problems presented in what is basically single page

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why when I use global array: "int in[] = new int[1000000 + 1];"
CHelper changes it to: "int in = new int[1000000 + 1];" ?

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    try using int[] in = new int[...]

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Because this notation is present in Java only to faciliate back compatibility with c and it would be pain to make it work

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

One more question — Is it possible to use stress testing with CHelper (writing an algorithm to automatically generate small test cases and their correct answers and printing the first one for which the main algorithm fails)? Also, is there any way to modify the template for the output class? I've checked through all of the templates in the project and haven't been able to find it. (It's given me a few issues with some online judges, most notably the USACO training pages.)

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It is possible to stress test. If you look in task properties there is "Test class" if you push Advanced

    It is possible to use whatever output class you want as long as it has close method. You just need to update preferences

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm trying to use your parsers, and class Task raises some questions. It contains all necessary information about the problem except time and memory limit, while they are usually very easily parsed. On the other hand, it contains your plugin-specific data like mainClass, truncate, includeLocale etc.

Did you think about extracting the parsers into a separate library with more general interface, independent of the plugin implementation?

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I thought about it and decided I do not have time to do it right for now.

    Memory limit is actually parsed and put into VM arguments

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Tasks from CSAcademy Rounds are not being parsed. I think their new update is causing problem with the C-Helper Chrome Extension.

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm afraid that'll have to wait until after World Finals (unless someone want to propose a pull request of course)

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Sir, can you update the CHelper for CSAcademy now? Tasks are not parsing at that site due to their upgradation of website.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi guys. I have no problem running my code on Google Code Jam Pretest. When it time to download the input file from Google, where should I store the input file. Does the script support generating the output file to upload to Google server, if yes , can someone advice me how? Thanks in advance for the great script.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You just put it in "work directory" (as defined by run configuration, usually project root) and run Main class

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Hi Egor. Thanks for the help and fast reply. The competitive coding world beef plp like u.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey Egor, now that this post is back to business, is it possible to have a feature where we can submit directly from the IntelliJ. That is we dont have to go back to the problem page, browse for our solution and get the result. The plugin would do all of this for me and return me the status of the solution. Even if you could do this for codeforces (because nowadays I just participate here), that would be great :)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I want to introduce this functionality sometime, but I need API to do this as I would not want to hack my way through