Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
????long long n,i,j,c,k,m,l;
????cin>>n;
????long long a[n];
????for(i=l=0;i<n;i++)cin>>a[i];
????for(i=0;i<n;i++){
????????for(j=i,c=m=k=0;j<n;j++){
????????????c+=a[j];
????????????if(c==0)k=j-i;
????????????m=max(k,m);
????????}
????????l=max(m,l);
????}
????for(i=n-1;i>=0;i--){
????????for(j=i,c=m=k=0;j>=0;j--){
????????????c+=a[j];
????????????if(c==0)k=j-i;
????????????m=max(k,m);
????????}
????????l=max(m,l);
????}
????if(l)cout<<l+1<<endl;
????else cout<<l<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: expected primary-expression before '?' token
    4 | ????long long n,i,j,c,k,m,l;
      | ^
a.cc:4:2: error: expected primary-expression before '?' token
    4 | ????long long n,i,j,c,k,m,l;
      |  ^
a.cc:4:3: error: expected primary-expression before '?' token
    4 | ????long long n,i,j,c,k,m,l;
      |   ^
a.cc:4:4: error: expected primary-expression before '?' token
    4 | ????long long n,i,j,c,k,m,l;
      |    ^
a.cc:4:5: error: expected primary-expression before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
a.cc:4:5: error: expected ':' before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
      |     :
a.cc:4:5: error: expected primary-expression before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
a.cc:4:5: error: expected ':' before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
      |     :
a.cc:4:5: error: expected primary-expression before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
a.cc:4:5: error: expected ':' before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
      |     :
a.cc:4:5: error: expected primary-expression before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
a.cc:4:5: error: expected ':' before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
      |     :
a.cc:4:5: error: expected primary-expression before 'long'
    4 | ????long long n,i,j,c,k,m,l;
      |     ^~~~
a.cc:5:1: error: expected primary-expression before '?' token
    5 | ????cin>>n;
      | ^
a.cc:5:2: error: expected primary-expression before '?' token
    5 | ????cin>>n;
      |  ^
a.cc:5:3: error: expected primary-expression before '?' token
    5 | ????cin>>n;
      |   ^
a.cc:5:4: error: expected primary-expression before '?' token
    5 | ????cin>>n;
      |    ^
a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 | ????cin>>n;
      |          ^
      |          yn
a.cc:5:11: error: expected ':' before ';' token
    5 | ????cin>>n;
      |           ^
      |           :
a.cc:5:11: error: expected primary-expression before ';' token
a.cc:5:11: error: expected ':' before ';' token
    5 | ????cin>>n;
      |           ^
      |           :
a.cc:5:11: error: expected primary-expression before ';' token
a.cc:5:11: error: expected ':' before ';' token
    5 | ????cin>>n;
      |           ^
      |           :
a.cc:5:11: error: expected primary-expression before ';' token
a.cc:5:11: error: expected ':' before ';' token
    5 | ????cin>>n;
      |           ^
      |           :
a.cc:5:11: error: expected primary-expression before ';' token
a.cc:6:1: error: expected primary-expression before '?' token
    6 | ????long long a[n];
      | ^
a.cc:6:2: error: expected primary-expression before '?' token
    6 | ????long long a[n];
      |  ^
a.cc:6:3: error: expected primary-expression before '?' token
    6 | ????long long a[n];
      |   ^
a.cc:6:4: error: expected primary-expression before '?' token
    6 | ????long long a[n];
      |    ^
a.cc:6:5: error: expected primary-expression before 'long'
    6 | ????long long a[n];
      |     ^~~~
a.cc:6:5: error: expected ':' before 'long'
    6 | ????long long a[n];
      |     ^~~~
      |     :
a.cc:6:5: error: expected primary-expression before 'long'
    6 | ????long long a[n];
      |     ^~~~
a.cc:6:5: error: expected ':' before 'long'
    6 | ????long long a[n];
      |     ^~~~
      |     :
a.cc:6:5: error: expected primary-expression before 'long'
    6 | ????long long a[n];
      |     ^~~~
a.cc:6:5: error: expected ':' before 'long'
    6 | ????long long a[n];
      |     ^~~~
      |     :
a.cc:6:5: error: expected primary-expression before 'long'
    6 | ????long long a[n];
      |     ^~~~
a.cc:6:5: error: expected ':' before 'long'
    6 | ????long long a[n];
      |     ^~~~
      |     :
a.cc:6:5: error: expected primary-expression before 'long'
    6 | ????long long a[n];
      |     ^~~~
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |   ^
a.cc:7:4: error: expected primary-expression before '?' token
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |    ^
a.cc:7:5: error: expected primary-expression before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
a.cc:7:5: error: expected ':' before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
a.cc:7:5: error: expected ':' before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
a.cc:7:5: error: expected ':' before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
a.cc:7:5: error: expected ':' before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'for'
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |     ^~~
a.cc:7:15: error: 'i' was not declared in this scope
    7 | ????for(i=l=0;i<n;i++)cin>>a[i];
      |               ^
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ????for(i=0;i<n;i++){
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ????for(i=0;i<n;i++){
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ????for(i=0;i<n;i++){
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ????for(i=0;i<n;i++){
      |    ^
a.cc:8:5: error: expected primary-expression before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
a.cc:8:5: error: expected ':' before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
a.cc:8:5: error: expected ':' before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
a.cc:8:5: error: expected ':' before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
a.cc:8:5: error: expected ':' before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'for'
    8 | ????for(i=0;i<n;i++){
      |     ^~~
a.cc:16:1: error: expected primary-expression before '?' token
   16 | ????for(i=n-1;i>=0;i--){
      | ^
a.cc:16:2: error: expected primary-expression before '?' token
   16 | ????for(i=n-1;i>=0;i--){
      |  ^
a.cc:16:3: error: expected primary-expression before '?' token
   16 | ????for(i=n-1;i>=0;i--){
      |   ^
a.cc:16:4: error: expected primary-expression before '?' token
   16 | ????for(i=n-1;i>=0;i--){
      |    ^
a.cc:16:5: error: expected primary-expression before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
a.cc:16:5: error: expected ':' before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
      |     :
a.cc:16:5: error: expected primary-expression before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
a.cc:16:5: error: expected ':' before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
      |     :
a.cc:16:5: error: expected primary-expression before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
a.cc:16:5: error: expected ':' before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
      |     :
a.cc:16:5: error: expected primary-expression before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
a.cc:16:5: error: expected ':' before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
      |     :
a.cc:16:5: error: expected primary-expression before 'for'
   16 | ????for(i=n-1;i>=0;i--){
      |     ^~~
a.cc:24:1: error: expected primary-expression before '?' token
   24 | ????if(l)cout<<l+1<<endl;
      | ^
a.cc:24:2: error: expected primary-expression before '?' token
   24 | ????if(l)cout<<l+1<<endl;
      |  ^
a.cc:24:3: error: expected primary-expression before '?' token
   24 | ????if(l)cout<<l+1<<endl;
      |   ^
a.cc:24:4: error: expected primary-expression before '?' token
   24 | ????if(l)cout<<l+1<<endl;
      |    ^
a.cc:24:5: error: expected primary-expression before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
a.cc:24:5: error: expected ':' before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
      |     :
a.cc:24:5: error: expected primary-expression before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
a.cc:24:5: error: expected ':' before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
      |     :
a.cc:24:5: error: expected primary-expression before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
a.cc:24:5: error: expected ':' before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
      |     :
a.cc:24:5: error: expected primary-expression before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
a.cc:24:5: error: expected ':' before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
      |     :
a.cc:24:5: error: expected primary-expression before 'if'
   24 | ????if(l)cout<<l+1<<endl;
      |     ^~
a.cc:25:1: error: expected primary-expression before '?' token
   25 | ????else cout<<l<<endl;
      | ^
a.cc:25:2: error: expected primary-expression before '?' token
   25 | ????else cout<<l<<endl;
      |  ^
a.cc:25:3: error: expected primary-expression before '?' token
   25 | ????else cout<<l<<endl;
      |   ^
a.cc:25:4: error: expected primary-expression before '?' token
   25 | ????else cout<<l<<endl;
      |    ^
a.cc:25:5: error: expected primary-expression before 'el