File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ UPE ProgComp Problem Generator
2
+ ==============================
3
+
4
+ This is a simple framework for generating and verifying a progcomp problem from
5
+ multiple sources. It can generate test files and their output given a generator
6
+ and solution in ruby, and it can verify a solution using either java or python
7
+ (and can be extended for other languages, too). Generation of a problem input
8
+ can take into account a given set of edge cases that it should include in every
9
+ input file.
10
+
11
+ How to use
12
+ ----------
13
+
14
+ If you want to examine a problem individually, you may use `ruby problem/gen.rb
15
+ [ n] ` to generate ` n` input sets (default 1) to ` STDOUT`. You can also verify a
16
+ set from ` STDIN ` using ` ruby problem/solution.rb < input ` . You can also pipe the
17
+ above two together for a one line generate and solve to make sure everything is
18
+ sane, as such:
19
+
20
+ $ ruby gen.rb 100 | ruby solution.rb
21
+
22
+ For generating data, use the ` rake ` command in the project root directory with
23
+ the ` gen ` command to generate the input files. If you specify the problem slug
24
+ in square brackets, only that problem will be generated, as such:
25
+
26
+ $ rake gen[streets]
27
+
28
+ For testing data, use ` rake ` by itself, or ` rake test[problem] ` to test a
29
+ specific problem. Execution will be stopped once an error finds a discrepency in
30
+ the two output files. All generated and tested data will be placed in a ` grader `
31
+ directory in the project root that acts as a direct drop in to the progcomp
32
+ server.
You can’t perform that action at this time.
0 commit comments