ekiauhce's blog

By ekiauhce, history, 3 months ago, In English

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.

Read more »

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