TL for a solution that is asymptotically optimal

Revision en1, by toss, 2015-10-15 23:54:12

Today was my first competition(#326) and I was surprised, because my solution for the Div2 C problem was asymptotically optimal [O(N+M) where N is the number of weights and M is the maximum weight], but it was not accepted, because it failed the 11th test case because of being too slow.

After the competition, I examined the successful solutions of other participants and I was surprised to see that they have the exact same strategy. How is this possible?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English toss 2015-10-15 23:54:12 508 Initial revision (published)