Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

blunder-brain's blog

By blunder-brain, history, 2 years ago, In English

Latest Submission

I am getting runtime error on testcase 2 idk why somebody please help! The issue is related to an access violation, even though I have applied checks everywhere.

Issue Solved!

  • Vote: I like it
  • +5
  • Vote: I do not like it

| Write comment?
»
2 years ago, hide # |
← Rev. 4  
Vote: I like it 0 Vote: I do not like it
if(index+2 < arr.size()){
        gcd[index] = __gcd(arr[index+1], arr[index+2]);
    }
    else{
        gcd[index] = INT_MAX;
    }

In else block gcd[index] minght be out of bounds