GoCF
Contest parser for codeforces (only C++)
Github link : https://github.com/sukeesh/GoCF
Requirements
- Python v2/3
- Python Beautiful Soup
- Colorama
Tested on Linux Ubuntu 14.04, Elementary OS Freya.
Installation
- Run
./install.sh
Usage
- After the contest begins, fire up your terminal and type
incf
- Now, enter the contest code
- GoCF will now download the test cases for you!
- Now, for example let us take contest code as
624
, name your problems as624_A.cpp
,624_B.cpp
, . .(Case sensitive) - Code in your favourite editor.
- now, for testing your solution just
gocf 624_A.cpp
. - If you want to add a custom test case,
adcf
and enter problem code.
Asciinema
EDIT
Added 'add Custom test case' feature and install script.
© [ Sukeesh ]
Thanks for your efforts!
Would be terrific to add support for Windows users as well ;)
/bin/gocf: line 15: GoCF/sukeesh.txt: No such file or directory this is an error coming when i am doing this gocf 625_A.cpp.
did you create a directory named 'GoCF' in your home folder?
and do
touch ~/GoCF/sukeesh.txt
.I have the same issue. And yes, I have such file and folder. Maybe permission problem?
open terminal
sudo vim /bin/gocf
, change the line 5replace
~/GoCF/sukeesh.txt
with/home/<username>/GoCF/sukeesh.txt
and in line 21 to
pathe='/home/<username>/GoCF/'
It should work fine now!
nothing happens after gocf a.cpp. I'm not strong in python, but it seems that it not enteres even to "while $todo -lt $tot " — loop
first
incf
, enter the contest code ( Contest code is different from round number ). for example, take 8VC Venture Cup Quals.,
Contest code is
626
, let's say you want to test it for problemA
, Your Problem name should be in the format626_A.cpp
[Strict]. Now,gocf 626_A.cpp
thanks, it works, problem was that name of cpp file was in wrong format
I think the program is not parsing the complete set. It's parsing only first 5 problems (A — E). Example : http://mirror.codeforces.com/contest/626
Yes,
We need to change it here
Almost all the contests have A-E , except for some openCup rounds
I will add that feature as soon as possible.
Done, Now works fine for all the contests!
Yeah I have seen it. Nice application by the way :) (y)
I got this error after run
incf
.I have installed it.(with installing
colorama
)thanks for this!
I will never get wrong answer on sample tests from today.
but still I think you have to work on it.
for example in
gocf
, you compile the code for every test, but it is enough to compile only for first test.And one other important notice: gocf compiles code with c++98, no c++11 :-)P.S. please add the feature that if compile fails, stop the process.(do not run pretests.)
Sorry for my bad english!
yes, will do it! :)
Done!
Auto comment: topic has been updated by Sukeesh (previous revision, new revision, compare).
Auto comment: topic has been updated by Sukeesh (previous revision, new revision, compare).
I improved the project (now supporting problems like A1, A2, ...) and also fixed conflicts with python3. Let's talk and update the project.
Hi Arpa,
Nice to hear. I'm interested in improving this project.
https://github.com/sukeesh/gocf
Shall we discuss on GitHub issue of this repo?