mikcf's blog

By mikcf, history, 18 months ago, In English

I wrote a tool 'Datagen' using C++. It's a command-line tool, targeted at CPers.

Using a single-line command, you can generate testcase in batches.

For example, if you want to generate #11-#20 testcases for your problem, with a time limit of 1.5s, and compare the running time with brute force solution as well:

datagen <yourproblem> 11..20 -h -t 1500

You only need to provide: (just use standard input/output. do not include 'freopen's)

  • <yourproblem>_gen.exe or <yourproblem>_gen.cpp

  • <yourproblem>_sol.exe or <yourproblem>_sol.cpp

  • (Optional) <yourproblem>_hack.exe or <yourproblem>_hack.cpp

Features

  • Compare with a Hack solution -h

  • Set a Time Limit -t xxxx

  • Generate Outputs Only -n

  • Compile(C++) Before Running -c

  • Show Result Using Colors

  • Auto Wait Until 1s to Avoid time(0) issues

You can find more here.

If You want to contribute to this project, feel free to do so!

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

»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

What is the use of this?

»
18 months ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

Thanks for sharing. For the generator provided to your program, I'd like to recommend https://github.com/luogu-dev/cyaron since it's multifunctional and convenient.(So could you please add python gen support?)

  • »
    »
    18 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    thanks for ur comment. to be specific, what features do u want to add? i'll try to add those

»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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