AndrewLazarev's blog

By AndrewLazarev, 15 years ago, In English
Topcoder has announced Topcoder Open 2010 with qualification rounds in May and the onsite final in October. This year 24 coders will win travel to Las Vegas by Algorithm competition. 350 top coders will receive Topcoder t-shorts.

Goodluck to everyone!

Full text and comments »

  • Vote: I like it
  • +6
  • Vote: I do not like it

By AndrewLazarev, 15 years ago, In English

Problem A. Winner


To solve the problem we just need accurately follow all rules described in the problem statement. Let's describe in more details required sequence of actions.
  1. First of all, we need to find the maximum score m at the end of the game. This can be done by emulating. After all rounds played just iterate over players and choose one with the maximum score.
  2. Second, we need to figure out the set of players who have maximum score at the end of the game. We can do this in the same way as calculating maximum score. Just iterate over players after all rounds played and store all players with score equal to m.
  3. And the last, we need to find a winner. To do this we will emulate the game one more time looking for player from the winner list with score not less m after some round.
This task demonstrates that sometimes it is easier to code everything stated in the problem statement, than thinking and optimizing.

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it