HeydarBABA's blog

By HeydarBABA, history, 5 years ago, In English

1239C - Очередь в поезде

63055149

can someone explain why my code is wrong.

thanks

EDIT: I missed this part in the problem text "at the very first moment he observes that all seats with numbers smaller than i are busy, he will go to the tank."

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

»
5 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

3 10

2 1 0

The answer is 30 20 10, your code will print 20 30 10.