Creating an online judge from scratch

后端 未结 4 829
梦如初夏
梦如初夏 2021-01-31 00:15

I\'ve participated in a few online programming contests and found the online judges used quite remarkable in functionality.

Coming to the point of the topic, my college

4条回答
  •  独厮守ぢ
    2021-01-31 00:47

    I'm really not sure what your question is about. It's not hard to write a design spec for a judge from scratch.

    You run a thing with given input data and feed the output data to the test program written by the question's author (because there's not always unique answer). People do sandboxing by running it remotely on a clean machine.

    Add: and please, no code analysis. You have two choices, either you make this code analysis available to contestants during the contest, or not.

    • If you do: they spend last 5 minutes of their time to make sure there are no down points. The code grows much worse in the process.

    • If you don't: you break the "rule of law": that people know the mechanism for giving points (also, that's why you always give them the first test in the text of the problem).

    Update: Sorry, I didn't notice at first that you ask some specific questions. Sandboxing may be less important than you think -- in a good competition the code becomes publicly available, so the "hackers" would be really embarrassed. However, I think I saw a practice where you can't do the i/o, filesystem or any other interaction with the system directly (they write main() for you and it's always the same; you only write the algorithm part with given input/output streams). Your judge should run only what it itself compiled from the source.

提交回复
热议问题