difask's blog

By difask, 10 years ago, In English

Sometimes it happens that I solve the problem and I have tests, but I can't find problem on the internet. So I need a tester that can test my solution on tests. I tried to find it on the internet, but I can't. I will appreciate if you give me such program. Thank you!

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

| Write comment?
»
10 years ago, # |
  Vote: I like it +2 Vote: I do not like it

I use Hightail for contests (http://codeforces.net/blog/entry/13141) and it works really well. It's open source -- maybe you could adapt it to read files?

  • »
    »
    10 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I also use Hightail for contests. It is really cool program. But it is a problem in it. Hightail can't work without contest(or task in CodeForces, CodeChef etc). And I want a program that will work with tests on my computer. Just tests and execution file. And it checks and I get AC, WA...

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

      A simple bash script would suffice. Something like this:

      for f in *.in
      do
        test_name=${f%.in}
        if ! ./solution <$test_name.in >$test_name.myout
        then
          echo "$test_name: RE"
        elif diff -bB --strip-trailing-cr $test_name.out $test_name.myout
        then
          echo "$test_name: AC"
        else
          echo "$test_name: WA"
        fi
      done
      

      (Obviously if the answer is not unique, you'll have to replace diff with a manually implemented checker.)

      Alternatively, you could use my caide software which has other features in addition to tester.

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