reaper28's blog

By reaper28, history, 8 days ago, In English,

question : https://codeforces.com/problemset/problem/1299/A solution : https://ideone.com/7l3fWY can anyone point out the error?

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

»
8 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Why don't you directly give link of your submission instead of pasted somewhere on external website. It gives an idea about the test case on which its failing and will be very helpful

  • »
    »
    8 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    In the submission i have a long code with template the one i sent you is without it

»
8 days ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

Probably you should initialize arrays: ll pre[n+1] = {}; ll suf[n+1] = {};