Skip to content

🚀 A tool for converting raw score from Parrots task to easily visual and extract individual person score for plotting a leaderboards graph.

License

Notifications You must be signed in to change notification settings

neungkl/parrots-score-calculation

Repository files navigation

Parrots Score Calculation

Build Status

🚀 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/

Introduction

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.

Features

  • 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

Usage

Run

Just clone this project and open index.html

Testing

For testing my code. Run following command below (Node.JS require).

npm install
npm run-script test

Leaderboards Fetching

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

  1. Configuration file private.tmp.json in leaderboards_fecher folder, where startSubmission is number to fetching the score.
  2. Change private.tmp.json to private.json
  3. Run node fetch.js <USER> <PASSWORD>. Replace <USER> and <PASSWORD> by your user and password.
  4. Waiting for fetching. (there are several log shown in command)
  5. After fetching complete. Run node clean.js for update the score.
  6. Open index.html

Author

  • Kosate Limpongsa (Me)

License

MIT © Kosate Limpongsa

About

🚀 A tool for converting raw score from Parrots task to easily visual and extract individual person score for plotting a leaderboards graph.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published