TLE's blog

By TLE, history, 4 years ago, In English

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

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

| Write comment?
»
4 years ago, # |
  Vote: I like it -33 Vote: I do not like it

It's not a new decade.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can it parse mashup contests?

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    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 years ago, # |
Rev. 2   Vote: I like it -24 Vote: I do not like it

How to enable auto-testing?

EDIT: Whoops I see now.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Done. Now you can enter 'a' to test all samples.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
4 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    "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 years ago, # |
  Vote: I like it +8 Vote: I do not like it

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 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it
    • 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 years ago, # |
  Vote: I like it +13 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Have you tried CP Editor?

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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!