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

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

I have troubles with this problem 1438B - Valerii Against Everyone.

As i figured out, we need to check if all numbers of the array are distinct and print "NO". Otherwise, print "YES".

So, when we iterating over all numbers we can just stop after finding non-disctinct integer. But this approach fails on 2-nd test and I don't know why. 123681639

Though, solution which compares size of set and n works pretty good. 123682623

Please, tell me what I'm missing.

Полный текст и комментарии »

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