Problem
Have you wanted to host an OI style contest on codefroces but faced the problem of different scoring methods between IOI and codeforces? codeforces takes the maximum score over all submissions while IOI takes the maximum score over all subtasks then sums the score of the subtasks.
Another difficulty was when the subtask has test cases with partial scoring. IOI takes the minimum achieved score while codeforces sums the scores of all cases in the subtask.
codeforces scoreboard
I created an app that uses the API of codeforces to get the submissions then gets the results of each submission then recreates the scoreboard It also supports showing names for domain group users.
Prerequisites
- You need an account with manager access to the required contests
- You need to have an API token and secret generated using this account. Refere to this link to know how: here
- The problems must be configured with groups and each case must belong to a group. Exactly one test of each group must have the maximum score of this subtask.
- You need problem.xml file for all problems in the contests (can be obtained from the polygon package)
Setup
- Download the code from this github repository: here
- run
pip install -r requirements.txt
to install required python packages. - Copy config.example.py to config.py and add your parameters
- Create data folder in the source directory. Add problem.xml for all problems in it and rename them to {contest 1-based index in contests array in config.py}{problem code}.xml like: 1A.xml, 2B.xml
- (Optionally) Add users.txt in data in the same format as domain users to display different names for users. Password and contests are irrelevant here so you can leave them empty.
Running
Run it as a normal flask app:
flask run
Note
This app is part of the Egyptian Olympiad in Informatics but it's not well tested, only tested on a finished contest. If someone can test it on a real-time contest and report bugs I'll be thankful.