🚀 This project associated with 2110327 Algorithm Design class. Aiming of this project is convert the long text score result from grader into an easily visually version, and leaderboards ranking system is also implemented by fetching plain HTML text from juding site and extract information, then visualize to a graph.
👉 Try demo https://neungkl.github.io/parrots-score-calculation/
Parrots is IOI 2011 task that use for final project of algorithm study class. The detail of the task is not implicate to this project.
But if you would like to read the task. You can read more detail here https://github.com/neungkl/parrots-ioi-solution
or googling with "Parrots IOI" keywords.
You must write a C or C++ for solve the task and submitted to local judge website. (created by doctoral lecturer in my university) Then, the website will grading your code and sent the result to you.
But the result is rather hard for examine. Here are an example of result.
[-[-X-T][TTX-][--XXTT][--XXTXX]]
Or maybe like,
[[uses 222 parrots][-X-T][T[uses 123 parrots]X-][--XXTT][--[uses 10 parrots]XTX[uses 20 parrots]]]
Or like,
[ [uses 40 parrots][[uses 10 parrots][uses 20 parrots][uses 30 parrots][uses 40 parrots]][[uses 100 parrots][uses 200 parrots][uses 300 parrots][uses 400 parrots]][[uses 1000 parrots][uses 2000 parrots][uses 3000 parrots][uses 4000 parrots][uses 5000 parrots][uses 6000 parrots]][[uses 1000 parrots][uses 2000 parrots][uses 3000 parrots][uses 4000 parrots][uses 5000 parrots][uses 6000 parrots][uses 7000 parrots]] ]
Maybe like this,
[ 9pr |[530pr |1282pr |1180pr |778pr |][778pr |1180pr |1282pr |530pr |][1682pr |3221pr |3073pr |1230pr |3400pr |503pr |][1229pr |3388pr |11446pr |10066pr |7168pr |11074pr |3566pr |] ]
So, I end up with creating a website that analyze the score and visualize it for easily to read and good visual, not hard for reading, and also some basic calculation stuff provided.
- Convert long pattern text to readable table
- The size of original input data set provided
- Ratio calculation supported
- Reporting for scoring in each subtask
- Overall summarize of the scores
- Leaderboards provided
Just clone this project and open index.html
For testing my code. Run following command below (Node.JS require).
npm install
npm run-script test
For fetching the leaderboards. You must already have user and password for https://www.nattee.net/grader/. The way I implemented is run the script for fetching every submission in judging website.
Then, convert the HTML plain text to a graph by extracting DOM elements.
How to Use
- Configuration file
private.tmp.json
inleaderboards_fecher
folder, wherestartSubmission
is number to fetching the score. - Change
private.tmp.json
toprivate.json
- Run
node fetch.js <USER> <PASSWORD>
. Replace<USER>
and<PASSWORD>
by your user and password. - Waiting for fetching. (there are several log shown in command)
- After fetching complete. Run
node clean.js
for update the score. - Open
index.html
- Kosate Limpongsa (Me)
MIT © Kosate Limpongsa