Блог пользователя toss

Автор toss, история, 9 лет назад, По-английски

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?

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

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