Utsa2000's blog

By Utsa2000, history, 6 weeks ago,

Someone hacked my solution of problem D. Now it says WA. But I can't find any mistake. Please help me to find the mistake. My submission: https://codeforces.com/contest/1520/submission/115269582

• 0

 » 6 weeks ago, # |   +5 In fact, you should also calculate the negative numbers.
•  » » 6 weeks ago, # ^ |   0 Utsa2000, Baylor_ is the someone who hacked your solution :P
•  » » 6 weeks ago, # ^ |   +1 Thank you. I understand now. I should use map.
 » 6 weeks ago, # |   0 For $a_i-i<0$ , you should calculate them instead of just ignoring them :(
•  » » 6 weeks ago, # ^ |   0 Yeah I understand now thank you for you suggestion. I thought j > i so I must need a[j] > a[i]. But I am dumb I forgot that I was calculating a[i] — i not a[j] — a[i].
 » 6 weeks ago, # |   0 problem D is really a war