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

Автор TLE, история, 4 года назад, По-английски

Hello Codeforces! It's a new decade already and I decided to write a tool to help me grab first bloods faster in Codeforces rounds, and I made it open-source since the Codeforces rules say so.

Everyone knows to grab first bloods faster, you need to write code and test samples with lightning speed. There's Hightail over there already but still, it's not the most comfortable tool for me to use.

So... (loud music) here comes my new tool CFBooster! You can click this link in github to download it. Basically, it will help you test inputs & outputs right inside your program and can even help you write some codes for input.

I'm too lazy to repeat it all again since there's a README in the above link there already. You can see an image of it in action by clicking here (sadly I cannot insert GIFs directly). You can also comment here (github stars are also appreciated).

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

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

It's not a new decade.

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

Can it parse mashup contests?

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

    Logging in is needed for mashup contests, so some extra work is needed (inputting username etc. probably) to grab the page. Maybe I'll look into it tomorrow.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -24 Проголосовать: не нравится

How to enable auto-testing?

EDIT: Whoops I see now.

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

looks nice, would it be hard to allow to run all input tests at once? I think it could be useful just to check all tests passes. nice tool!.

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

Can i redirect input from file to the tool in terminal ?

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

why does it fail to parse input for some problems and i see this kind of log "cannot parse input for problem A." what are the challenges faced in parsing input?

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

    "Cannot parse input for problem" means that the program cannot parse the input format, not the sample input/output cases. For each problem there will be two files generated: file.cpp for the file without input parsing, and file-i.cpp for the file with input parsing, if the program can understand the input format.

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

Some improvement suggestions:

  • To make sure that the input format is correct, you can add some input validation to the program such as
{ char c; if(!cin || (cin>>c)){ cerr<<"Incorrect input format detected\n"; return 1; } }

That way the user doesn't always have to check the input format manually.

  • You can use C++11 raw string literal to insert the sample input/output test cases directly into the program without having to parse the source code and worrying about the user accidentally delete/change the input/output.
  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
    • The samples are always validated before being given to the user. However, the risk is still on the user's side. (the support for long long is updated in ver 0.12, not sure if it's correct tho since I didn't find any problem to test on)
    • I think my current design can probably make the code look more friendly and it's easier to add new test cases (new test cases following the format will be automatically considered). I'm not sure if that's what most people think tho.
»
4 года назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Currently, I think cf-tool can be a better choice, although it does not provide automatic input parsing code generation.

But more is better! Hopefully, your tool will become more advanced and intelligent!

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

    Have you tried CP Editor?

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

      Yes, I have tried that, but I prefer using other IDEs, so I only need a command-line tool to quickly parse problems, generate code from templates, run tests and submit code.

      Nevertheless, you have done a great job!