#include "soccer.h"
#include<bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define fi first
#define se second
const int maxn=2005;
int f[maxn][maxn],Max[maxn][maxn];
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
int x=-1,y=-1,cnt=0;
for(int i=0;i<N;i++){
for(int j=0;j<N;j++) if(F[i][j]==1) x=i,y=j,cnt++;
}
if(cnt==1) return N*N-min(x+1,N-x)*min(y+1,N-y);
vector<pii> p;
for(int i=0;i<N;i++){
int l=0;
for(int j=0;j<N;j++){
if(F[i][j]){
if(l<j) p.push_back({l,1-j});
l=j+1;
}
}
if(l<N) p.push_back({l,1-N});
}
sort(p.begin(),p.end());
for(int i=1;i<(int)p.size();i++) if(p[i].se>p[i-1].se) return 0;
p.clear();
for(int i=0;i<N;i++){
int l=0;
for(int j=0;j<N;j++){
if(F[j][i]){
if(l<j) p.push_back({l,1-j});
l=j+1;
}
}
if(l<N) p.push_back({l,1-N});
}
sort(p.begin(),p.end());
for(int i=1;i<(int)p.size();i++) if(p[i].se>p[i-1].se) return 0;
return N*N-cnt;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
partial |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
ok |
2 |
Correct |
0 ms |
212 KB |
ok |
3 |
Correct |
0 ms |
212 KB |
ok |
4 |
Correct |
0 ms |
212 KB |
ok |
5 |
Correct |
1 ms |
212 KB |
ok |
6 |
Correct |
0 ms |
212 KB |
ok |
7 |
Correct |
1 ms |
436 KB |
ok |
8 |
Correct |
17 ms |
2260 KB |
ok |
9 |
Correct |
261 ms |
31648 KB |
ok |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
ok |
2 |
Correct |
0 ms |
212 KB |
ok |
3 |
Partially correct |
1 ms |
212 KB |
partial |
4 |
Partially correct |
0 ms |
212 KB |
partial |
5 |
Partially correct |
0 ms |
212 KB |
partial |
6 |
Partially correct |
0 ms |
212 KB |
partial |
7 |
Partially correct |
1 ms |
212 KB |
partial |
8 |
Incorrect |
0 ms |
212 KB |
wrong |
9 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
partial |
2 |
Correct |
0 ms |
212 KB |
ok |
3 |
Correct |
0 ms |
212 KB |
ok |
4 |
Partially correct |
1 ms |
212 KB |
partial |
5 |
Partially correct |
0 ms |
212 KB |
partial |
6 |
Partially correct |
0 ms |
212 KB |
partial |
7 |
Partially correct |
0 ms |
212 KB |
partial |
8 |
Partially correct |
1 ms |
212 KB |
partial |
9 |
Incorrect |
0 ms |
212 KB |
wrong |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
partial |
2 |
Correct |
0 ms |
212 KB |
ok |
3 |
Correct |
0 ms |
212 KB |
ok |
4 |
Correct |
0 ms |
212 KB |
ok |
5 |
Correct |
0 ms |
212 KB |
ok |
6 |
Partially correct |
1 ms |
212 KB |
partial |
7 |
Partially correct |
0 ms |
212 KB |
partial |
8 |
Partially correct |
0 ms |
212 KB |
partial |
9 |
Partially correct |
0 ms |
212 KB |
partial |
10 |
Partially correct |
1 ms |
212 KB |
partial |
11 |
Incorrect |
0 ms |
212 KB |
wrong |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
partial |
2 |
Correct |
0 ms |
212 KB |
ok |
3 |
Correct |
0 ms |
212 KB |
ok |
4 |
Correct |
0 ms |
212 KB |
ok |
5 |
Correct |
0 ms |
212 KB |
ok |
6 |
Partially correct |
1 ms |
212 KB |
partial |
7 |
Partially correct |
0 ms |
212 KB |
partial |
8 |
Partially correct |
0 ms |
212 KB |
partial |
9 |
Partially correct |
0 ms |
212 KB |
partial |
10 |
Partially correct |
1 ms |
212 KB |
partial |
11 |
Incorrect |
0 ms |
212 KB |
wrong |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
partial |
2 |
Correct |
0 ms |
212 KB |
ok |
3 |
Correct |
0 ms |
212 KB |
ok |
4 |
Correct |
0 ms |
212 KB |
ok |
5 |
Correct |
0 ms |
212 KB |
ok |
6 |
Correct |
1 ms |
212 KB |
ok |
7 |
Correct |
0 ms |
212 KB |
ok |
8 |
Correct |
1 ms |
436 KB |
ok |
9 |
Correct |
17 ms |
2260 KB |
ok |
10 |
Correct |
261 ms |
31648 KB |
ok |
11 |
Partially correct |
1 ms |
212 KB |
partial |
12 |
Partially correct |
0 ms |
212 KB |
partial |
13 |
Partially correct |
0 ms |
212 KB |
partial |
14 |
Partially correct |
0 ms |
212 KB |
partial |
15 |
Partially correct |
1 ms |
212 KB |
partial |
16 |
Incorrect |
0 ms |
212 KB |
wrong |
17 |
Halted |
0 ms |
0 KB |
- |