Due to the installation of a new fire alarm in ITMO server room, the system may be occasionally unavailable on the 27-th of May between 06:00 and 15:00 (UTC). ×

Ahmed_Allawati's blog

By Ahmed_Allawati, history, 12 days ago, In English,

can any one tell me what is the mistake in the idea of my code here is the code and problem link

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

12 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Ahmed_Allawati (previous revision, new revision, compare).

12 days ago, # |
  Vote: I like it +2 Vote: I do not like it

There are two issues with your code.

First is that the problem states that if there are extra problems from a contest then they are discarded, not made into some smaller contest.

Second is that you may not want to choose the largest contest as the one to use when you are missing a number. Consider {3, 3, 3, 4, 5, 6}. It's best to use the 3's for 1, 2, and 3 so that you have 6 when you need it on the 6th day.