logo

Academy

DocumentationReference

Score and ranking

How to read your total score, your global rank and your national rank on each platform.

A programming solution and a ctf-hacking solution must record your total score and your ranking. They must also record the score of that challenge. These values show your progress, and each one has a destination:

ValueDestination
Your total scoreThe score field of your YAML file
Your global rankingThe global-rank field of your YAML file
Your national rankingThe national-rank field of your YAML file
The score of the challengeThe (complexity) part of the commit title

Your commit message must pass the test-commit-msg job. Commit template: code and hack gives its rules.

This page tells you how to read these values on each platform.

1. Programming Challenges

Academy supports two platforms for a programming challenge: CodeAbbey and SPOJ. Write in your YAML file the values that the platform shows to you at the moment of the solution. These values go in the score, global-rank and national-rank fields. Your policy gives the platforms that you can use, and the file policies/data.yaml holds that policy.

1.1 CodeAbbey

  1. World ranking.

    Open the "Ranking" tab on CodeAbbey.

    The "Ranking" tab on CodeAbbey

    Go to the bottom of the page. Your position in the world ranking is there.

    The world ranking position at the bottom of the CodeAbbey ranking page

  2. National ranking.

    In the same "Ranking" tab, select your country.

    The country selector on the CodeAbbey ranking page

    The page does not show your position. Thus you must find it. Do these three steps:

    1. Open each page of the list, and find your user name with CTRL + F.
    2. Count the row of your user name, from the top of the page.
    3. Calculate 50 * (page - 1) + rows.

    In this formula:

    • 50 is the quantity of users on one page.
    • page is the number of the page that shows your user name. The formula subtracts 1, because it counts only the full pages before your page.
    • rows is the row of your user name from step 2.

    A page of the CodeAbbey national ranking, with the page number and the row that give the national rank

    The national rank in the example above is 50 * (2 - 1) + 3 = 53.

1.2 SPOJ

For SPOJ (www.spoj.com), read the values on your user profile at the moment that you solve a problem.

A SPOJ user profile, with the total score and the ranking

  1. Total score.

    • Open your SPOJ profile: https://www.spoj.com/users/<your-spoj-username>/.
    • The total score is next to your user name. Read this value immediately before you solve a problem (score.initial), and again after SPOJ gives you the points (score.final). score.progress is final - initial.
    • SPOJ calculates the score of a problem with the formula 80 / (40 + N), where N is the quantity of solvers. The value is thus dynamic: it becomes smaller as more people solve the problem. Write the value that you saw at the moment of the solution, and do not change it later. A later change on SPOJ is correct and expected.
    • A problem with a high N is different. An example is TEST, the introductory problem of SPOJ, with more than 200,000 solvers. Its score is smaller than 0.001, and it becomes 0.000 at the standard precision of 3 decimals. In that condition, write complexity: 0.000 and the same value in score.progress. The CI accepts these values. The progression view on your profile shows no jump for that solution. This is the correct record, because the platform gave you almost no points.
  2. World ranking (global-rank.initial and global-rank.final).

    • The account page https://www.spoj.com/myaccount/ is the fastest source. It shows World Rank: #<position> (<points>).
    • Read this value before you send the solution (initial), and again after SPOJ gives you the points (final).
  3. National ranking (national-rank.initial and national-rank.final).

    • Open the ranking of your country. The address for Colombia is https://www.spoj.com/ranks/users/CO.

    • If your user name is in that list, read your position there.

    • Your user name is not always in that list. SPOJ then gives no position for you. In that condition, write 0 in the three sub-fields:

      national-rank:
        initial: 0
        final: 0
        progress: 0

      The CI accepts these values, because the validator permits 0 and the arithmetic initial - final == progress is correct. Do not invent a position: 0/0/0 is the honest record. Write your true position when you get one in a later solution.

2. ctf-hacking

Read your total score and your ranking on your profile page of the platform. The image below shows these two values.

Score and ranking fields for a hacking platform profile

3. vbd-hacking

A vbd-hacking solution has no score and no ranking. Its YAML file records the counts of the vulnerabilities instead. VbD template gives those fields.

On this page