Please subscribe to the official Codeforces channel in Telegram via the link ×

Egor's blog

By Egor, 11 years ago, In English

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

I would also appreciate donations


Kattis support for both Chrome and Contest parsers. You'd need to accept new permissions for Chrome extension. Good luck at ACM ICPC World Finals online contest!


Codechef fix


Fixed issue with template selection and Chrome plugin interaction


Smallish update — you can now select task template per task. You can have several templates for general tasks, one where you need to output with Case #, GCJ where you need to integrate parallelization and similar


Support for Idea 14.1+

Parsers for RCC and USACO fixed

You can now parse other Codeforces contests when live contest is ongoing

Sorry for big delay, it was couple of crazy months for me


All parsers should work now. Chrome extension may disable itself on update, reenable it


Bayan support (will be live after Chrome store will approve update), fix for GCJ and HackerRank


Fixed Java 8 support. From now on Java 8 is target version, previous Java versions may or may not work properly

Also speed up and for RCC parsing, HackerRank parsing fix and Delete Task pop up fix


GCJ support should be fixed now. Also RCC support is fixed. Please note that non-current round take a lot of time to load as there is no place where I can see all round ids (it may appear after second round, I'll update then). Please also note that 1st round is currently have 2 instances as both id 4 and id 7 corresponds to it. I'm not sure how well my plugin will handle increased load on their servers and weird pages returned because of it, but I hope for the best

TopCoder checker support coming up in next release


GCJ support fixed, also GCJ is now supported through Chrome extension as well


Fix for Idea 13.1


Mostly fixes (Codeforces, Hackerrank, Yandex). Includes new memory limits support for TC and new action to edit task (if you for some reason do not want to do this through Edit configurations)


Facebook Hacker Cup and USACO support through Chrome plugin. Also HackerRank should work now


HackerRank support. Also compatible with Java 6


Added Codeforces support for Chrome extension. Should be usefull for those Gym contest that have non pdf/doc/etc problem statements


Rejoice Chrome users — there is now extension to Chrome that will assist in parsing Yandex.Contest tasks. Support for other sites (Codeforces Gym, for example) is coming as well. You will be prompted to install Chrome extension on first load of CHelper-supported project

You can download extension here

Some bugfixes and improvements are also included (Timus should work for now)


GCJ support finally! With it comes new type of input — local regular expression. Main classes build with this input type would take most recently modified file that matches provided regexp as input.

Also some little fixes to smart testing


Small fix due to Russian CodeCup page format change. GCJ support would be developed during next week


Smart testing

New mode, which automatically will test your program only on first failed test from last run and will test on all tests if that test will pass. With this feature you can easily start debug on failed test without need to switch tests on/off. This mode is on by default, you can disable it in project settings

Also test case generation mechanism changed a bit. You now can have at most one class with test cases, but multiple test case methods in it. This method shoule be annotated @TestCase. For compatibility if test class implements TestProvider/TopCoderTestProvider createTests() would still be called. If you create checker or test class through task settings it will now automatically be opened

Finally, templates for TopCoder are introduced


Templates for automatically generated stubs added 3 new files are automatically added to eligible projects (i. e. projects with — TaskClass.template, CheckerClass.template and TestCaseClass.template. You may use following placeholders in all this files: %package% — package where file will be created %InputClass% — short name of input class %InputClassFQN% — fully qualified name of input class (used in imports) %OutputClass% — short name of output class %OutputClassFQN% — fully qualified name of output class (used in imports)

Also you can use %TaskClass% in TaskClass.template, %CheckerClass% in CheckerClass.template and %TestCaseClass% in TestCaseClass.template, which is basically short class names of corresponding classes

Would you delete this files by mistake they would be recreated next time you reopen project or when they are needed

TopCoder gengerated files are currently do not have templates, will do in next version


Previous version was built using Java 1.7, which may lead for Idea to fail on start up if run under Java 1.6. If this is your case please download it here and unpack to %home%\.IntelliJIdea%version%\config\plugins


This version contains minor and major changes

Minor change is hopefully last iteration of changes in TopCoder support. From now on you do not need to restart arena after restarting Idea. Also socket method is reinstaited with more checks to insure no fails and with automatic back up from file method

Major change is contributed mostly by Petr and provides support for Cojac. This is to help find errors such as unitended integer overflow and others. Support is turned off by default, you can turn it on or off for separate task in task configuration as well as for all new tasks in project settings


Urgent — temporary TopCoder fix


Leda (Idea 12) readiness

3.02 — even smaller update

Force locale setting was cleared on opening of Edit Tests dialog (and some others)

3.01 — small update:

Timus current/future contests now works

Redundant caption removed

So I decided it is a good time to go on with the release.

You can read intallation (and some other, under development) instructions here. I would not recommend manual installation, but you can download plugin directly here.

You are welcome to contribute and/or provide translations for manual for different languages. Source code is located here

Feature requests are appretiated as well

Full text and comments »

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

By Egor, 11 years ago, translation, In English
  • Vote: I like it
  • +30
  • Vote: I do not like it

By Egor, 11 years ago, translation, In English

Good news everyone!

Google CodeJam World Finals will be conducted on July 27th at 13:10 GMT. Full list of finalists

Good luck :)

Full text and comments »

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

By Egor, 11 years ago, translation, In English

Good news everyone!

Today at 16:00 UTC a dozen people will get their places in Parallel Round 3B ;)

Good luck all!

Full text and comments »

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

By Egor, 11 years ago, translation, In English

Good news everyone!

Next TopCoder SRM scheduled today at 15:10 UTC

Full text and comments »

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

By Egor, 12 years ago, translation, In English

New version released because of some TopCoder parsing bugs lately (SRM 530 Div-2 Medium, SRM 531 Div-2 Easy and SRM 534 Div-1 Medium). Other features: UI: switch task to current editor and editor to current task automatically Fixed width font for tests

Download link Configuration format had not changed

UPD: CodeChef generation fixed

Full text and comments »

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

By Egor, 12 years ago, translation, In English
1. Installation
You need to download plug-in and configuration. Plug-in should go to %home_dir%\.IntelliJIdea10\config\plugins (if directory plugins is absent you need to create it), also you should include chelper.jar to class path of your project (Project Structure -> Dependencies -> Add Single Entry Module Library...). After that you need to edit configuration (see next section) and put it in project root. That's it — you are all set. For TopCoder you would need moj plugin for Arena, manual and download link is here

2. Configuration
As a general note, if some property in configuration represents a folder you must enter relative path from project root (using / instead of )
inputClass - full qualified name of class used for input (like java.util.Scanner). This class should implement method next that returns String — next token from input — and it should have constructor that takes InputStream as only argument
outputClass - full qualified name of class used for output (like Ouput class shoud has constructor, that take OuputStream and one that take Writer as parameter and also method close.
excludePackages - comma separated list of package prefixes. Classes from such packages would not be inlined but rather imported. In most cases you should leave it as is
outputDirectory - directory where full source code would be stored. Should be under source and in default package (for example, if you create standart idea project, "src" spould be ok)
author - content of @author tag in. If empty no author tag would be created
archiveDirectory - directory where tasks would be archived. Should not be under source
defaultDirectory - direcory where tasks would be created by default. Should be under source in non-default package (for example src/my/package)
topcoderDirectory - directory where moj puts its TopCoder stubs. Should be under source in default package (e.g. src)
enableUnitTests - should be true if you want unit tests to be created and false otherwise
testDirectory - directory where tests would be stored. Shoud be under source
After configuration change you need to reload project for changes to take effect

3. Actions
I would recommend to add following actions on main toolbar (Customize Menus and Toolbars... from context menu of toolbar, actions are in Plug-ins->CHelper): New Task, Edit Tests, Archive Task, Delete Task, Create Codeforces Tasks.

New Task (Alt+F2) — creates new task in defaultDirectory
Edit Tests (Alt+F5) — opens test editor

Archive Task (Alt+F6) — archives task (deletes all it files and stores them in archive, also creates unit tests if configured to do so)
Delete Task - deletes task and all associated files
Parse Contest - creates all tasks for particular contest (currently Codeforces, CodeChef, E-Olimp and Timus are supported).

Parse Task - creates single task.

Site Contest ID Problemset task ID Contest task ID
Codeforces contest_id (131) contest_id letter (131 A) contest_id letter (131 A)
CodeChef contest_code (NOV11) problem_code (GCD2) contest_code problem_code
Timus contest_id (101) problem_id (1000) contest_id problem_number (101 1)
Copy Source (Alt+F8) — copies content of to clipboard. This is useful for judges that do not support submission of file

4. New Task dialog

Name - task class name
Test type - type of tests — either single test per file, number of tests and then tests themselves or just some tests until some condition is met. You need to throw UnknownError in last case to indicate that there would be no more tests
Input type/Output type - input/output type. Standard — stdin/stdout, Task_id — file input/output with file names %Name%.toLowerCase() + ".in"/".out", Custom — just file input/output, names provided in separate text fields
Heap memory - memory limit
Stack memory - stack size limit (defaults are same as codeforces)

5. Task files
For each task 2 files is creates. In main task class there is one method:
void solve(int testNumber, %input% in, %output% out)
testNumber — 1-based index of test in file
In checker class there are 3 methods:
String check(%input% input, %input% expected, %input% actual)
should return null if answer is correct, non empty string if answer is wrong and empty string to run default checker
double getCertainty()
returns certainty for double comparision in default checker
Collection<? extends Test> generateTests()
additional generated tests

For TopCoder tasks the only class would contain method from problem statement. Task would be created automatically when you opens problem in TopCoder client (if moj properly configured)

Full text and comments »

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

By Egor, 12 years ago, translation, In English
Updated to 2.33 - Codeforces page format changed
Updated to 2.32 - some debug output was not removed
Updated to 2.31 - TopCoder task sometimes do not run if first arguments is a String. Do not consitently reproducable


Defect Task generation: CodeChef: Multiple samples not working
Defect TopCoder: main method not deleted even if unused
Enhancement Task Generation: E-Olimp support
Enhancement Task Generation: Timus support
Enhancement Tester: add option to trunkate long input/output and enable it by default
Enhancement Parser: remember selected contest/task site for current session

Input/output of more than 2000 characters are now truncated by default in tester - first 1500 and last 100 symbols are printed. You can turn this off in "Edit Configurations"
Formats of ids for new site would be added to manual
Download link, configuration format is intact

Full text and comments »

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

By Egor, 12 years ago, translation, In English


Enhancement Add universal interface for task generation
Enhancement Tester: ability to pass message from checker irrespective from verdict type
Defect New Task: default directory should be created if absent
Enhancement Create action to copy full source in order to submit to judges that do not provide file selection as option
Enhancement Task generation: support for CodeChef

Now you can generate single task from archive - enter "contest_number task_number" as id, for example - "128 B". Also CodeChef support is implemented. Problem statements on CodeChef are structured pretty badly, so heuristic algorithm is used to extract test cases, which may lead to extra spaces/new lines or complete fail (i.e. no task may be generated). For last 10 contests every task is generated. For Contest Parser please pass last part of contest url as id (e. g. NOV11), for tasks from archive - problem code (e.g. LCM), for tasks from contests - "contest_id problem_code" (e.g. "NOV11 DOMNOCUT")

Also "Copy Source" action added which just copies (generated source file) to clipboard. Useful for judges that do not support submitting files

Download link, configuration had not changed

Full text and comments »

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

By Egor, 12 years ago, translation, In English


Defect Codeforces generation: should unescape HTML
Defect TopCoderTester: should accept arrays without curle bracers
Enhancement Add ability to select tests on which task would be tested
Enhancement Allow using custom output class instead of PrintWriter
Enhancement Tester: Should return WA if actual is not exhausted in checker

New property added to configuration - outputClass. It is by default. Ouput class shoud has constructor, that take OuputStream and one that take Writer as parameter and also method close. You can leave your old configuration as all properties that are absent in configuration file are set to default values

Method next of input class shoud throw exception if file is exhausted (Scanner do this)

Download links: plugin, configuration

Full text and comments »

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

By Egor, 12 years ago, translation, In English

Some screenshots:

Current version is 2.33

Let's try again. I had rewrote from scratch plug-in for IntelliJ Idea (that have free community edition, btw) which is designed to do the following:

1. Tests on all entered tests with one click

2. Inlines files from your library to your source code (inlucding removing of unused code)

3. Generates unit tests for your library based on entered tests.

First version seemed to be not very popular due to complexity of set up - special project, need of click "Run Task" each time before submit, etc.

In new version all this was fixed and, as a bonus, you can now create tasks for whole Codeforces contest (including sample tests already entered for you) by entering contest id.


That's all. Thank you for your time. Should you encounter any problem/bug using this plug-in please post comments to this entry insteam of sending me PM - that should help other people with same issues

Full text and comments »

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