### Jasperr's blog

By Jasperr, history, 21 month(s) ago, ,

Hi! After releasing CHelper Companion as an alternative to the original CHelper extension six months ago, development has been ongoing and CHelper Companion has "evolved" into Competitive Companion.

Competitive Companion is a browser extension for Chrome and Firefox that can parse problems and contests and extract the useful data. This includes things like time/memory constraints and sample test cases. While CHelper Companion was only capable of sending this data to CHelper, Competitive Companion works with pretty much all popular tools. Next to that, Competitive Companion is also capable of sending the data to your private tools, without requiring a complex setup.

Using it is very simple. Just install the extension, make sure you got one of the supported tools open, navigate to a problem page and click on the green plus icon in the top-left of your browser. On websites where Competitive Companion is able to parse contests, navigating to the page with all the problems and clicking on the green plus icon will download and parse all problems in the contest at once. You can also use the shortcut Ctrl+Shift+U instead of the green plus icon.

At the moment, Competitive Companion can send parsed problem data to the following tools:
- CHelper
- JHelper
- Hightail
- Mind Sport
- Caide
- acmX
- Competitive Programming Helper
- CP Editor
- Any other tool that can parse the data that is being sent, read more about that in the README on GitHub, and have a look at the example project here.

Competitive Companion includes parsers for the following websites:

Website Problem parser Contest parser
A2OJ
ACMP
AtCoder
Baekjoon Online Judge
Bloomberg CodeCon
CodeChef
Codeforces
CodeMarshal
COJ
CSES
CSU-ACM Online Judge
DevSkill
DMOJ
E-Olymp
ECNU Online Judge
FZU Online Judge
HackerEarth
HackerRank
HDU Online Judge
HIT Online Judge
hihoCoder
Hrbust Online Judge
ICPC Live Archive
Jutge
Kattis
LibreOJ
LightOJ
Luogu
MSK Informatics
NowCoder
NYTD Online Judge
omegaUp
Panda Online Judge
PEG Judge
POJ
QDUOJ
SPOJ
SSOIER
Timus
Toph
UOJ
URI Online Judge
USACO
USACO Training
UVa Online Judge
Virtual Judge
Yandex

Competitive Companion's source code can be found on GitHub. Releases are pushed to both the Chrome Web Store and Mozilla Add-Ons.

Feedback, bug reports and feature requests are all very welcome!

• +47

 » 21 month(s) ago, # |   +3 Feature Request I think adding a keyboard shortcut for parsing problem would be great.
•  » » 21 month(s) ago, # ^ |   +4 Great idea, I released an update which adds the keyboard shortcut Ctrl+Shift+U to parse problems/contests, it should be available in a few minutes. Whenever the green plus icon is visible, that shortcut will work too.
•  » » » 21 month(s) ago, # ^ |   +1 Awesome job.
 » 21 month(s) ago, # | ← Rev. 2 →   0 UPD: OK. I have found the reason, My CHelper plugin was not updated (it was 4.1.12)... After updating the plugin it is working properly. Thank you, You have done awesome job...Is there any version dependency with the add-ons? It is not working for me, while parsing this problem. :(I am using, Chrome (Version 67.0.3396.87 (Official Build) (64-bit)) and Intellij IDEA (2018.1).
 » 21 month(s) ago, # |   0 Forgive my ignorance but I'm new to this tool.What exactly happens when we click on the Green Button on a contest page? I can see a green bar sliding across the top, guessing this is the page being parsed? But what now? How do we use it now?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 I'm assuming you are seeing a blue bar, not a green one (because if it's green, it's probably not from my extension).When you see that bar, it is retrieving all the problems and extracting the useful data out of all of them, after which it sends them to one of the supported tools.To make use of this extracted data, you need to do one of the following:- Use one of the supported tools (see the post to see which one are supported).- Add support for the extension to your tool, which requires quite a bit more work. Instructions on how to do that can be found here. If you need help with getting up and running using one of the supported tools, please tell me which one you are using so I can give more specific instructions.
 » 19 months ago, # | ← Rev. 2 →   +10 I have just released version 2.3.0, which is one of the biggest updates so far. It includes several bug fixes and parsers for 11 more online judges, including two that I have been wanting to add for a long time: UVa Online Judge and ICPC Live Archive.I do want to clarify two things regarding this update though:1. The extension's size has gone up from 35kb to 660kb. This has to do with a new library, PDF.js, that I needed to add in order to be able to extract the sample testcases from the PDF files on UVa Online Judge and ICPC Live Archive.2. The extension will now request permission to "access your data for all websites". This does not mean that the extension spies on you: it will never do that. If you don't trust me, feel free to take a look at the code on GitHub. This change was necessary in order to better support sites like HackerRank which use the browser's history api to let you navigate over their website instead of using normal links.
 » 16 months ago, # |   0 For some reason using this extension with CHelper, it parses task fine. However when I run my code as I normally do, I get following: Exception in thread "main" java.lang.ClassNotFoundException: my.ETrialForChief at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher\$AppClassLoader.loadClass(Launcher.java:339) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:265) at net.egork.chelper.tester.NewTester.test(NewTester.java:81) at net.egork.chelper.tester.NewTester.main(NewTester.java:34) I do not have this issue with tasks created by the CHelper chrome plugin, however those do not parse the testcases correctly ... Does anybody have any advice on what I am doing wrong? Thanks!
•  » » 16 months ago, # ^ |   0 If anybody runs into similar problem, it was somehow because my Intellij ended up with "Build project automatically" unchecked. I followed steps here and now everything works great, thanks for the tremendous plugin! https://zeroturnaround.com/software/jrebel/quickstart/intellij/enable-automatic-compilation-in-intellij-idea/
•  » » » 16 months ago, # ^ |   0 Try to update inteliji idea
 » 15 months ago, # |   0 Can you add LeetCode please their ide is very slow
•  » » 15 months ago, # ^ |   +11 Unfortunately, LeetCode cannot be added. This is because LeetCode forces solutions to be written in a pre-defined method with a pre-defined signature (method parameters and return type), which is something that Competitive Companion does not support. The chances of it being implemented in the future is pretty low, considering how none of the publically available tools that Competitive Companion sends data to are capable of handling such constraints at the moment.Besides that, LeetCode doesn't seem to have any structure in their problem descriptions, which makes it pretty much impossible to parse something like the sample testcases.
•  » » » 15 months ago, # ^ |   0 Got it Thanks man
 » 15 months ago, # |   0 Can you add vjudge.net problems and contests?
•  » » 15 months ago, # ^ | ← Rev. 3 →   +8 I have just released version 2.5.0 which adds a problem parser for Virtual Judge. Your browser should auto-update within 24 hours.Unfortunately, I could not find a way to parse all problems in a contests at once due to how Virtual Judge renders contest problems dynamically. You can however parse all problems in a contest separately, just like how you would parse out-of-contest problems.It's also worth noting that while the problem parser can parse the sample testcases for a lot of problems, it will not work correctly for all of them. This is because Virtual Judge does not have a standarized format for problem descriptions, so the extension has to look for signs of sample testcases like 
and  tags. This isn't a rock-solid solution, but it works for the majority of the problems. Feel free to create an issue on GitHub when you find a problem that isn't parsed correctly.
 » 9 months ago, # |   0 Hi Jasperr, I think it would be nice if we can set the name of taskClass to the problem'ID, but not the actual name of the it. For example, for this problem, taskClass can be named "1A", but not "ATheatreSquare".Thank you for this awesome tool.
•  » » 9 months ago, # ^ |   +5 Thanks for the suggestion, but I'm not planning on changing this. I think "AThreatreSquare" is better than "1A" when you're participating in a contest with multiple problems. Especially when having to differentiate between different problems having the full name instead of just the letter can be very helpful.
•  » » » 9 months ago, # ^ |   0 I got it.Thank you for your respond.
 » 6 months ago, # |   0 Any good parser for sublime text??