Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :loop
- gen.exe > input.txt
- wa.exe < input.txt > wa_output.txt
- correct.exe < input.txt > output.txt
- fc output.txt wa_output.txt
- if errorlevel 1 exit
- goto loop
- rem comments:
- rem 1. switch commands output off
- rem 2-8. infinite cycle. loop - name of the variable. May differ from loop
- rem 3. generate test and write it to input.txt
- rem 4-5. run wa solution and correct solution
- rem on test saved in input.txt. The first program outputs result in wa_output.txt,
- rem the second - in output.txt
- rem 6. compare files output.txt and wa_output.txt (fc = file compare)
- rem 7. check if files are different. If so, exit script
- rem (so this test, on which wa solution works in a wrong way, will be saved in input.txt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement