Блог пользователя jaythegenius48

Автор jaythegenius48, 10 лет назад, По-английски

Once while participating in the contest, I wanted to find out the room number of my colleague. So I asked him and he told me the room number.

From this, I was inspired and started thinking how can this be achieved without asking my friend.

So, I wrote a script in python, which finds the username in "xyz" room. But since the distribution and labelling of rooms is different in each contest. I was unsuccessful in achieving this. Since it requires searching in all rooms.

This could be the best place to ask this question!
Are there any patterns? Using the API can solve this?
Any suggestions are welcomed.
Sorry if I am violating the rules of codeforces. I am new to crawling of webpages.
Thanx in advance:)

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится +21 Проголосовать: не нравится

double clicking on string with person in standings shows room and all submits&hacks

»
10 лет назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

There is a Codeforces API and there is a contest.standings method there which has a room parameter which should be helpful if you decide to do that programatically. For example:

http://codeforces.com/api/contest.standings?contestId=374&from=1&count=5000&showUnofficial=true&room=1 will bring you all the contestants from the contest with id = 374 in room 1. This seems to be the best candidate for your task.

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится

    This was indeed helpful! But how many rooms are there im contest and which room number is the last one is recognised by?

    • »
      »
      »
      10 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      Hm, good question and I have no good answer for it. As far as I know you can't get that using API. It seems that room numbers are like [1 .. lastOfficialRoom] and [1000 .. lastUnofficialRoom], so you can start with 1, 2, 3, etc until you get an empty room and then do the same for the unofficial rooms.