Facebook Hacker Cup
The directory follows a year/round/problem structure.
- Is in a directory named using the point value and the problem name, like 30 Balanced smileys.
- Contains a readme file with the full description of the problem.
- Contains an
exampledirectory with the input and output files provided in the problem description.
datadirectory contains the generated input provided for the submission.
generateddirectory contains the output generated for the submission.
The tight loop
I'm using the simplest quickest feedback loop I could come up with:
- Run the program piping in the input from the example file, and piping out the output to an output file.
- Diff the generated output file against the expected output file.
An example using php:
watch -n 1 "php solve.php < example/input.txt > output.txt && diff example/output.txt output.txt"
watch -n 1 "python solve.py < example/input.txt > output.txt && diff example/output.txt output.txt"
MIT © Orestes Carracedo