Problem | baseplans |
---|---|
User | YEethui |
Submission Time | 2024-02-23 11:25:56 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
baseplans.cpp: In function ‘int main()’:
baseplans.cpp:2:146: error: expected ‘;’ before ‘}’ token
2 | using namespace std;const int N=200013;int n,ans=0,s[N];int main(){cin>>n;for(int i=0;i<n;i++)for(int j=0;j<n;j++){char t;cin>>t;if(t=='1')s[j]=i}for(int i=0;i<n;i++){int minn=1e18,maxn=-1e18;for(int j=i;j<n;j++){minn=min(minn,s[j]);maxn=max(maxn,s[j])if(minn-maxn==i-j)ans++;}}cout<<ans<<endl;return 0;}
| ^
| ;
baseplans.cpp:2:253: error: expected ‘;’ before ‘if’
2 | using namespace std;const int N=200013;int n,ans=0,s[N];int main(){cin>>n;for(int i=0;i<n;i++)for(int j=0;j<n;j++){char t;cin>>t;if(t=='1')s[j]=i