1 / 4
Dec 2009

Hello. I have one contest ( spoj.pl/SHORTEN2) where main and the only task is to shorten codes as much as possible. I have eleven tasks for the present and I have problem with ranking. I want do something like this: person A wrote programme which lenght is 55 and person B wrote programme which lenght is 79 and I want person A to have more points than person B (for the present both person have 1 point in ranking).

How to do such a thing? Is this possible to change some option to achieve this or I have to write my own judge?

  • created

    Dec '09
  • last reply

    Mar '10
  • 3

    replies

  • 1.4k

    views

  • 2

    users

  • 3

    links

14 days later

look at the contset judge of ZFUN08 (by turbo), both max and min problems are properly scored, is it ok for you?

Hmm. I have good ranking for my problems - i chose option "4. Score is source length" but the "main" ranking is wrong.
Ranking from ZFUN08 is ok, but I'm not sure if it suit, because in ZFUN08 the more points user gains for each problem, the more he will have in ranking and in my contest it is inversely (the shorter code, the more points). Unless it can be changed.
The best option would be ranking, where for each problem user gain points with this formula:
(best_score/users_score)*100
How can I write such a judge? Bacause formula is not complicated, so it seems easy. However I found SPOJ judges:
spoj.pl/files/judge/1/2
spoj.pl/files/judge/2/
...
But I don't know how SPOJ work, so it will be difficult for me to write such a judge. For example I don't know what does library spoj.h.

2 months later

With Adrian Kosowski's help I changed ranking and now score for each task is calculated with formula:
(shortest_length/user's_length)*points_for_task

Now users can rival. smiley