Compilation error "I dont know why !"

Revision en3, by Basel_Ahmed, 2022-11-19 00:56:46

why codeforcesgive me a compilation error while all other compile give me the write output?

[submission:181542252] [problem:R. Palindrome Array] ~~~~~

include<bits/stdc++.h>

using namespace std; int size; int pr=0,pl=0; void read(long long ar[], int s){ for (int i = 0; i < s; ++i) { cin>>ar[i]; pr++; } } void palindrome (long long ar[]){ if(pr==(size-1)/2){ cout<<"YES"; return; } if(ar[pl]==ar[pr-1]){ ++pl; --pr; return palindrome(ar); } else{ cout<<"NO"; return; } } int main () { cin>>size; long long array[size]; read(array,size); palindrome(array); return 0; } ~~~~~ https://codeforces.me/group/MWSDmqGsZm/contest/223339/submission/181542252

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English Basel_Ahmed 2022-11-19 00:57:19 584
en3 English Basel_Ahmed 2022-11-19 00:56:46 570
en2 English Basel_Ahmed 2022-11-19 00:55:57 1231
en1 English Basel_Ahmed 2022-11-19 00:51:04 189 Initial revision (published)