Utsa2000's blog

By Utsa2000, history, 6 weeks ago, In English

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

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

»
6 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

In fact, you should also calculate the negative numbers.

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

For $$$a_i-i<0$$$ , you should calculate them instead of just ignoring them :(

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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, # |
  Vote: I like it 0 Vote: I do not like it

problem D is really a war