Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Блог пользователя Sukeesh

Автор Sukeesh, история, 8 лет назад, По-английски

GoCF

Contest parser for codeforces (only C++)

Github link : https://github.com/sukeesh/GoCF

Requirements

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 as 624_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

asciicast

EDIT

Added 'add Custom test case' feature and install script.

© [ Sukeesh ]

  • Проголосовать: нравится
  • +70
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Thanks for your efforts!

Would be terrific to add support for Windows users as well ;)

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

/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.

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    did you create a directory named 'GoCF' in your home folder?
    and do touch ~/GoCF/sukeesh.txt .

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I have the same issue. And yes, I have such file and folder. Maybe permission problem?

    • »
      »
      »
      8 лет назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      open terminal sudo vim /bin/gocf, change the line 5
      replace ~/GoCF/sukeesh.txt with /home/<username>/GoCF/sukeesh.txt

      and in line 21 to pathe='/home/<username>/GoCF/'
      It should work fine now!

      • »
        »
        »
        »
        8 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        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

        • »
          »
          »
          »
          »
          8 лет назад, # ^ |
            Проголосовать: нравится +1 Проголосовать: не нравится

          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 problem A, Your Problem name should be in the format 626_A.cpp [Strict]. Now, gocf 626_A.cpp

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I think the program is not parsing the complete set. It's parsing only first 5 problems (A — E). Example : http://codeforces.com/contest/626

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I got this error after run incf.

Traceback (most recent call last):
  File "/home/arpa/GoCF/Parse.py", line 8, in <module>
    from colorama import init
ImportError: No module named colorama
  • »
    »
    8 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    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!

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I improved the project (now supporting problems like A1, A2, ...) and also fixed conflicts with python3. Let's talk and update the project.