This repo stored judge and solution of NTU BIME PDSA in 2020.
https://hackmd.io/nxED7UQJSw6YWWK5QA3YGA
https://hackmd.io/KJCHp-HDTjSY9SBGyJV-3w
https://hackmd.io/8Ru_zm_oSeC3bLwsiJWGow
https://hackmd.io/lyo5V8XFQIOr3cfEp0n1rg
https://hackmd.io/SlAPLkYUSQ6abqgr31ihbg
https://hackmd.io/ZlZCexfvSmakl06qLG7COA
https://hackmd.io/NPDNSN8TRO-UHeitGxnmiw
https://hackmd.io/3LLeJJonRROPWed9ffGWvg
JudgeControll.py
- Read testcase (JSON format)
- Compile the code if needed
- Execute judger with time_limit
- Get the status and score from judge
- Write log and score into file
Judger.py
- A abstract class for inheritance
- Implement
run
compare
for each problem (Inxx.judge.py
) - Read one testcase (JSON format)
- Calculate the time each sample run
- Output the result(Actullay it's a file)
Judger.java
- Same as Python Judger
- Need to implement
class
to read JSON input. (Inxx.judge.java
)
I use python and numpy random to genereate testcase.
xx.test.py
and the testcase data will store in xx.json
xx.sol.py
xx.sol.java
python3 xx.judge.py
dk openjdk:14-slim javac -cp gson.jar:algs4.jar:. xx.judge.java xx.sol.java Judger.java
dk openjdk:14-slim java -cp gson.jar:algs4.jar:. Judge