toss's blog

By toss, history, 11 years ago, In English

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?

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

»
11 years ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

fixed submission 13653920. cin is too slow without ios_base::sync_with_stdio(false)