shubhsy's blog

By shubhsy, history, 5 years ago, In English

Hi! I have attempted this problem numerous times and get a Runtime Error in test case 8 with exit code -1073741819 Here is the link to the problem: http://codeforces.com/contest/1148/problem/B Here is my attempt by using two-pointers method to solve it. http://codeforces.com/contest/1148/submission/55003260 Thanks!

  • Vote: I like it
  • -7
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it
  • b[m-(k-i)-1] is out of bounds if m == k and i == 0
  • while(a[i]+ta>b[j])++j; you dot't check the bounds for j
  • j+=k-i; maybe out of bounds too?