ekiauhce's blog

By ekiauhce, history, 2 months ago, In English

I have troubles with this problem 1438B - Валерий против всех.

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.

  • Vote: I like it
  • 0
  • Vote: I do not like it

2 months ago, # |
  Vote: I like it +6 Vote: I do not like it

In problems with multitests one may not return from solve function until all input is read.