the Online Judge for Changjun Middle School
- install nodejs(need ES6 support, ver >= 0.11 required), npm, mongodb by your package manager
- run
npm install
at current directory. It's recommended since Mongoose need to be compiled - run
node --harmony bin/server.js
To make live easier, you can install some other packages:
LiveScript
: to compile the LiveScript code to JavaScript code. then runlsc -wco . src
to watch and compile the LiveScript codes.nodemon
: to automatically restart server. runnodemon --harmony bin/server.js
instead ofnode --harmony bin/server.js
DEBUG=dollast:* nodemon --harmony -w bin bin/server.js
to run serverlsc -c src -o . -w
to watch all LiveScript fileslsc -c webpack.ls && mv webpack.js webpack.config.js && webpack
to watch JS files in client side
- create an empty round without any problems; keep the round id in this step.
- create problems as you like; remember to set round id when creating;
- that's it!
I give up. The solution is... to create the same problem twice!
The problem is that we don't know when to cancel a problem, i.e., when to delete the rid
attribute of this problem. And I think there should be duplicated problems, even if I add the feature that we can reuse problems in different rounds.
If you want, you can delete this attribute (the rid
attr for each problem) manually, and then you can reuse it. To make it more handy, there is one API named round.publish
which releases all problems in this round.
Each resource is managed by a binary code ABC
, while A indicates the permission of the owner, and B indicates that of the users in this group, and C is that of everyone.
r
: get descriptions
w
: change descriptions
x
: submit