diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resource/runner/problem/.gitignore b/resource/runner/problem/.gitignore index a82daa9..136b83a 100644 --- a/resource/runner/problem/.gitignore +++ b/resource/runner/problem/.gitignore @@ -1,6 +1,6 @@ * !.gitignore !example -!example/* +!example/**/* !book !book/**/* diff --git a/resource/runner/problem/book/ch1/1. factorial/config.json b/resource/runner/problem/book/ch1/1. factorial/config.json index 2bc2544..7043a63 100644 --- a/resource/runner/problem/book/ch1/1. factorial/config.json +++ b/resource/runner/problem/book/ch1/1. factorial/config.json @@ -1,43 +1,21 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { - "Lang": "c", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - }, - { - "Lang": "cpp", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - } - ], - "Tasks": [ - { - "Id": 1, - "Points": 20 - }, - { - "Id": 2, - "Points": 20 - }, - { - "Id": 3, - "Points": 20 - }, - { - "Id": 4, - "Points": 20 - }, - { - "Id": 5, - "Points": 20 - } - ] + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 20}, + {"Id": 2, "Points": 20}, + {"Id": 3, "Points": 20}, + {"Id": 4, "Points": 20}, + {"Id": 5, "Points": 20} + ] } \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/2. divide/config.json b/resource/runner/problem/book/ch1/2. divide/config.json index 264d4a4..f310200 100644 --- a/resource/runner/problem/book/ch1/2. divide/config.json +++ b/resource/runner/problem/book/ch1/2. divide/config.json @@ -1,47 +1,22 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { - "Lang": "c", - "Type": "default", - "Script": "", - "Cmp": "FCMP" - }, - { - "Lang": "cpp", - "Type": "default", - "Script": "", - "Cmp": "FCMP" - } - ], - "Tasks": [ - { - "Id": 1, - "Points": 10 - }, - { - "Id": 2, - "Points": 10 - }, - { - "Id": 3, - "Points": 10 - }, - { - "Id": 4, - "Points": 23 - }, - { - "Id": 5, - "Points": 22 - }, - { - "Id": 6, - "Points": 25 - } - ] + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "FCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "FCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 23}, + {"Id": 5, "Points": 22}, + {"Id": 6, "Points": 25} + ] } \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/3. acc_sum/config.json b/resource/runner/problem/book/ch1/3. acc_sum/config.json index 808439f..55f82ef 100644 --- a/resource/runner/problem/book/ch1/3. acc_sum/config.json +++ b/resource/runner/problem/book/ch1/3. acc_sum/config.json @@ -1,43 +1,21 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { - "Lang": "c", - "Type": "default", - "Script": "", - "Cmp": "NCMP" - }, - { - "Lang": "cpp", - "Type": "default", - "Script": "", - "Cmp": "NCMP" - } - ], - "Tasks": [ - { - "Id": 1, - "Points": 20 - }, - { - "Id": 2, - "Points": 20 - }, - { - "Id": 3, - "Points": 20 - }, - { - "Id": 4, - "Points": 20 - }, - { - "Id": 5, - "Points": 20 - } - ] + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 20}, + {"Id": 2, "Points": 20}, + {"Id": 3, "Points": 20}, + {"Id": 4, "Points": 20}, + {"Id": 5, "Points": 20} + ] } \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/4. f_sum/config.json b/resource/runner/problem/book/ch1/4. f_sum/config.json index f5b3106..285cf43 100644 --- a/resource/runner/problem/book/ch1/4. f_sum/config.json +++ b/resource/runner/problem/book/ch1/4. f_sum/config.json @@ -1,63 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { - "Lang": "c", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - }, - { - "Lang": "cpp", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - } - ], - "Tasks": [ - { - "Id": 1, - "Points": 10 - }, - { - "Id": 2, - "Points": 10 - }, - { - "Id": 3, - "Points": 10 - }, - { - "Id": 4, - "Points": 10 - }, - { - "Id": 5, - "Points": 10 - }, - { - "Id": 6, - "Points": 10 - }, - { - "Id": 7, - "Points": 10 - }, - { - "Id": 8, - "Points": 10 - }, - { - "Id": 9, - "Points": 10 - }, - { - "Id": 10, - "Points": 10 - } - ] + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] } \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/5. multiply/config.json b/resource/runner/problem/book/ch1/5. multiply/config.json index f5b3106..285cf43 100644 --- a/resource/runner/problem/book/ch1/5. multiply/config.json +++ b/resource/runner/problem/book/ch1/5. multiply/config.json @@ -1,63 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { - "Lang": "c", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - }, - { - "Lang": "cpp", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - } - ], - "Tasks": [ - { - "Id": 1, - "Points": 10 - }, - { - "Id": 2, - "Points": 10 - }, - { - "Id": 3, - "Points": 10 - }, - { - "Id": 4, - "Points": 10 - }, - { - "Id": 5, - "Points": 10 - }, - { - "Id": 6, - "Points": 10 - }, - { - "Id": 7, - "Points": 10 - }, - { - "Id": 8, - "Points": 10 - }, - { - "Id": 9, - "Points": 10 - }, - { - "Id": 10, - "Points": 10 - } - ] + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] } \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/6. yubikili/config.json b/resource/runner/problem/book/ch1/6. yubikili/config.json index 2bc2544..7043a63 100644 --- a/resource/runner/problem/book/ch1/6. yubikili/config.json +++ b/resource/runner/problem/book/ch1/6. yubikili/config.json @@ -1,43 +1,21 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { - "Lang": "c", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - }, - { - "Lang": "cpp", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - } - ], - "Tasks": [ - { - "Id": 1, - "Points": 20 - }, - { - "Id": 2, - "Points": 20 - }, - { - "Id": 3, - "Points": 20 - }, - { - "Id": 4, - "Points": 20 - }, - { - "Id": 5, - "Points": 20 - } - ] + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 20}, + {"Id": 2, "Points": 20}, + {"Id": 3, "Points": 20}, + {"Id": 4, "Points": 20}, + {"Id": 5, "Points": 20} + ] } \ No newline at end of file diff --git a/resource/runner/problem/book/ch1/7. hanoi/config.json b/resource/runner/problem/book/ch1/7. hanoi/config.json index f5b3106..285cf43 100644 --- a/resource/runner/problem/book/ch1/7. hanoi/config.json +++ b/resource/runner/problem/book/ch1/7. hanoi/config.json @@ -1,63 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { - "Lang": "c", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - }, - { - "Lang": "cpp", - "Type": "default", - "Script": "", - "Cmp": "HCMP" - } - ], - "Tasks": [ - { - "Id": 1, - "Points": 10 - }, - { - "Id": 2, - "Points": 10 - }, - { - "Id": 3, - "Points": 10 - }, - { - "Id": 4, - "Points": 10 - }, - { - "Id": 5, - "Points": 10 - }, - { - "Id": 6, - "Points": 10 - }, - { - "Id": 7, - "Points": 10 - }, - { - "Id": 8, - "Points": 10 - }, - { - "Id": 9, - "Points": 10 - }, - { - "Id": 10, - "Points": 10 - } - ] + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "HCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] } \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/1. random/config.json b/resource/runner/problem/book/ch2/1. random/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/1. random/config.json +++ b/resource/runner/problem/book/ch2/1. random/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/2. carry/config.json b/resource/runner/problem/book/ch2/2. carry/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/2. carry/config.json +++ b/resource/runner/problem/book/ch2/2. carry/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/3. masses/config.json b/resource/runner/problem/book/ch2/3. masses/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/3. masses/config.json +++ b/resource/runner/problem/book/ch2/3. masses/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/4. knumber/config.json b/resource/runner/problem/book/ch2/4. knumber/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/4. knumber/config.json +++ b/resource/runner/problem/book/ch2/4. knumber/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/5. secret/config.json b/resource/runner/problem/book/ch2/5. secret/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/5. secret/config.json +++ b/resource/runner/problem/book/ch2/5. secret/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/6. scholar/config.json b/resource/runner/problem/book/ch2/6. scholar/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/6. scholar/config.json +++ b/resource/runner/problem/book/ch2/6. scholar/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/7. count/config.json b/resource/runner/problem/book/ch2/7. count/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/7. count/config.json +++ b/resource/runner/problem/book/ch2/7. count/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/8. pipe/config.json b/resource/runner/problem/book/ch2/8. pipe/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/8. pipe/config.json +++ b/resource/runner/problem/book/ch2/8. pipe/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch2/9. sol/config.json b/resource/runner/problem/book/ch2/9. sol/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch2/9. sol/config.json +++ b/resource/runner/problem/book/ch2/9. sol/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch3/1. stairs/config.json b/resource/runner/problem/book/ch3/1. stairs/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch3/1. stairs/config.json +++ b/resource/runner/problem/book/ch3/1. stairs/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch3/2. rabbit/config.json b/resource/runner/problem/book/ch3/2. rabbit/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch3/2. rabbit/config.json +++ b/resource/runner/problem/book/ch3/2. rabbit/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch3/3. surface/config.json b/resource/runner/problem/book/ch3/3. surface/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch3/3. surface/config.json +++ b/resource/runner/problem/book/ch3/3. surface/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch3/4. domino/config.json b/resource/runner/problem/book/ch3/4. domino/config.json index 45b2d86..e5deb2b 100644 --- a/resource/runner/problem/book/ch3/4. domino/config.json +++ b/resource/runner/problem/book/ch3/4. domino/config.json @@ -1,23 +1,26 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 10 }, - { "Id": 2, "Points": 10 }, - { "Id": 3, "Points": 10 }, - { "Id": 4, "Points": 10 }, - { "Id": 5, "Points": 10 }, - { "Id": 6, "Points": 10 }, - { "Id": 7, "Points": 10 }, - { "Id": 8, "Points": 10 }, - { "Id": 9, "Points": 10 }, - { "Id": 10, "Points": 10 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 10}, + {"Id": 2, "Points": 10}, + {"Id": 3, "Points": 10}, + {"Id": 4, "Points": 10}, + {"Id": 5, "Points": 10}, + {"Id": 6, "Points": 10}, + {"Id": 7, "Points": 10}, + {"Id": 8, "Points": 10}, + {"Id": 9, "Points": 10}, + {"Id": 10, "Points": 10} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch3/5. bee/config.json b/resource/runner/problem/book/ch3/5. bee/config.json index a36b8a9..55f82ef 100644 --- a/resource/runner/problem/book/ch3/5. bee/config.json +++ b/resource/runner/problem/book/ch3/5. bee/config.json @@ -1,18 +1,21 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 20 }, - { "Id": 2, "Points": 20 }, - { "Id": 3, "Points": 20 }, - { "Id": 4, "Points": 20 }, - { "Id": 5, "Points": 20 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 20}, + {"Id": 2, "Points": 20}, + {"Id": 3, "Points": 20}, + {"Id": 4, "Points": 20}, + {"Id": 5, "Points": 20} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch3/6. acme/config.json b/resource/runner/problem/book/ch3/6. acme/config.json index 378c6d6..8d3128b 100644 --- a/resource/runner/problem/book/ch3/6. acme/config.json +++ b/resource/runner/problem/book/ch3/6. acme/config.json @@ -1,18 +1,21 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "LCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "LCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 20 }, - { "Id": 2, "Points": 20 }, - { "Id": 3, "Points": 20 }, - { "Id": 4, "Points": 20 }, - { "Id": 5, "Points": 20 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "LCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "LCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 20}, + {"Id": 2, "Points": 20}, + {"Id": 3, "Points": 20}, + {"Id": 4, "Points": 20}, + {"Id": 5, "Points": 20} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/book/ch3/7. railway/config.json b/resource/runner/problem/book/ch3/7. railway/config.json index a36b8a9..55f82ef 100644 --- a/resource/runner/problem/book/ch3/7. railway/config.json +++ b/resource/runner/problem/book/ch3/7. railway/config.json @@ -1,18 +1,21 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, - "Languages": [ - { "Lang": "c", "Type": "default", "Script": "", "Cmp": "NCMP" }, - { "Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP" } - ], - "Tasks": [ - { "Id": 1, "Points": 20 }, - { "Id": 2, "Points": 20 }, - { "Id": 3, "Points": 20 }, - { "Id": 4, "Points": 20 }, - { "Id": 5, "Points": 20 } - ] -} + "Languages": [ + { + "Lang" : "c", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + }, + { + "Lang" : "cpp", + "Judge:" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": {"Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}} + } + ], + "Tasks" : [ + {"Id": 1, "Points": 20}, + {"Id": 2, "Points": 20}, + {"Id": 3, "Points": 20}, + {"Id": 4, "Points": 20}, + {"Id": 5, "Points": 20} + ] +} \ No newline at end of file diff --git a/resource/runner/problem/example/README.md b/resource/runner/problem/example/README.md index d68454a..14f9f0d 100644 --- a/resource/runner/problem/example/README.md +++ b/resource/runner/problem/example/README.md @@ -25,22 +25,40 @@ ```json5 { - "Runtime": { - // 运行时配置 - "TimeLimit": 1000, // 时间限制 (ms) - "MemoryLimit": 16, // 内存限制 (MB) - "NProcLimit": 1 // 进(线)程 限制 - }, - "Languages": [ // 支持的语言 - // c 语言,使用自定义评测脚本,脚本为 ./judge/XYZ.Makefile - {"Lang": "c", "Type": "custom", "Script": "XYZ.Makefile", "Cmp": ""}, - // c++ 语言,使用默认评测脚本,答案比对方式为 NCMP(testlib) - {"Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP"} - ], - "Tasks": [ - // 评测点信息 - {"Id": 1, "Points": 10}, // 第一个评测点,分值 25 分,使用 ./data/{input,output}/1.{input,output} 为测试数据 + "Languages": [ + { + // C 语言 + "Lang" : "c", + // 使用自定义评测脚本,脚本为 ./judge/custom.Makefile,Cmp 将被忽略 + "Judge" : {"Type": "custom", "Script": "custom.Makefile", "Cmp": ""}, + // 运行时配置:时间(ms) 内存(MB) 进/线程数目 + "Runtime": { + // 题目构建阶段,用于生成测试数据等,可选,默认值见下 + "Prebuild": {"TimeLimit": 300000, "MemoryLimit": 256, "NProcLimit": 64}, + // 编译阶段,可选,默认值见下 + "Compile" : {"TimeLimit": 60000, "MemoryLimit": 256, "NProcLimit": 64}, + // 运行阶段,必选 + "Run" : {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}, + // 答案检查阶段,可选,默认值见下 + "Check" : {"TimeLimit": 60000, "MemoryLimit": 128, "NProcLimit": 64} + } + }, + { + // C++ 语言 + "Lang" : "cpp", + // 使用默认评测脚本,答案比对方式为 NCMP(testlib),Script 将被忽略 + "Judge" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + // 运行时配置:Run 必须存在,其余可选,默认值见 C 语言部分 + "Runtime": { + "Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1} + } + } + ], + // 评测点信息,总分应当为 100 分 + "Tasks" : [ + // 第一个评测点,分值 10 分,使用 ./data/{input,output}/1.{input,output} 为测试数据 + {"Id": 1, "Points": 10}, {"Id": 2, "Points": 20}, {"Id": 3, "Points": 30}, {"Id": 4, "Points": 40} diff --git a/resource/runner/problem/example/config.json b/resource/runner/problem/example/config.json index 3e4effc..acb3087 100644 --- a/resource/runner/problem/example/config.json +++ b/resource/runner/problem/example/config.json @@ -1,14 +1,24 @@ { - "Runtime": { - "TimeLimit": 1000, - "MemoryLimit": 16, - "NProcLimit": 1 - }, "Languages": [ - {"Lang": "c", "Type": "custom", "Script": "XYZ.Makefile", "Cmp": ""}, - {"Lang": "cpp", "Type": "default", "Script": "", "Cmp": "NCMP"} + { + "Lang" : "c", + "Judge" : {"Type": "custom", "Script": "XYZ.Makefile", "Cmp": ""}, + "Runtime": { + "Prebuild": {"TimeLimit": 300000, "MemoryLimit": 256, "NProcLimit": 64}, + "Compile" : {"TimeLimit": 60000, "MemoryLimit": 256, "NProcLimit": 64}, + "Run" : {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1}, + "Check" : {"TimeLimit": 60000, "MemoryLimit": 128, "NProcLimit": 64} + } + }, + { + "Lang" : "cpp", + "Judge" : {"Type": "default", "Script": "", "Cmp": "NCMP"}, + "Runtime": { + "Run": {"TimeLimit": 1000, "MemoryLimit": 16, "NProcLimit": 1} + } + } ], - "Tasks": [ + "Tasks" : [ {"Id": 1, "Points": 10}, {"Id": 2, "Points": 20}, {"Id": 3, "Points": 30}, diff --git a/resource/runner/problem/example/judge/XYZ.Makefile b/resource/runner/problem/example/judge/custom.Makefile similarity index 95% rename from resource/runner/problem/example/judge/XYZ.Makefile rename to resource/runner/problem/example/judge/custom.Makefile index 665e359..11096ea 100644 --- a/resource/runner/problem/example/judge/XYZ.Makefile +++ b/resource/runner/problem/example/judge/custom.Makefile @@ -3,7 +3,6 @@ include ${TEMPLATE}/c.mk ${TEMPLATE}/Judger.mk # 评测分四个阶段 # 1. prebuild: 用于提前生成测试数据、评测器、spj等工具,runner 只执行一次 -# 详细信息见 XYZ.Makefile # 2. compile: 用于编译用户提交的程序 # 目录映射情况: # /woj/problem/judge 映射到题目目录的 ./judge <-- Readonly @@ -30,8 +29,6 @@ include ${TEMPLATE}/c.mk ${TEMPLATE}/Judger.mk # TEST_NUM=... <-- 当前测试点编号 # CMP=... <-- 在 config.json 中配置的比较器,如 NCMP # 其余通用环境变量,详见 ubuntu-full.Dockerfile -# 执行限制: -# 目前版本硬编码限制:时间 60s,内存 256mb compile: $(CC) $(CFLAGS) -o $(PREFIX)/user/$(USER_PROG).out $(PREFIX)/user/$(USER_PROG).$(LANG) $(PREFIX)/problem/judge/gadget.c diff --git a/resource/runner/scripts/ubuntu-full.Dockerfile b/resource/runner/scripts/ubuntu-full.Dockerfile index 980c278..4b27c16 100644 --- a/resource/runner/scripts/ubuntu-full.Dockerfile +++ b/resource/runner/scripts/ubuntu-full.Dockerfile @@ -1,9 +1,17 @@ FROM docker.io/library/ubuntu:22.04 WORKDIR /woj -# Install dependencies -RUN apt-get update && apt-get upgrade -y && apt-get install -y gcc g++ clang make cmake autoconf m4 libtool gperf git parallel python3 wget && apt-get clean && rm -rf /var/lib/apt/lists -RUN wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz && rm go1.21.5.linux-amd64.tar.gz +# Install dependencies & languages +RUN apt-get update && apt-get upgrade -y && apt-get install -y software-properties-common \ + && add-apt-repository ppa:pypy/ppa && apt-get update \ + && apt-get install -y \ + git parallel wget curl \ + gcc g++ clang make cmake autoconf m4 libtool gperf \ + python3 pypy3 \ + && apt-get clean && rm -rf /var/lib/apt/lists +RUN wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz && rm go1.21.6.linux-amd64.tar.gz +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH=/usr/local/go/bin:/root/.cargo/bin:$PATH # Copy source code RUN mkdir -p /woj/framework && mkdir -p /woj/problem