Submission #1076336

#TimeUsernameProblemLanguageResultExecution timeMemory
1076336MarwenElarbiSoccer Stadium (IOI23_soccer)C++17
12 / 100
4577 ms8284 KiB
#include <bits/stdc++.h> #include "soccer.h" using namespace std; #define pb push_back #define fi first #define se second const int nax = 2005; const int MOD = 1e9+7; int x[nax][nax]; int y[nax][nax]; int biggest_stadium(int N, std::vector<std::vector<int>> F) { int n=N; int ans=0; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { ans+=(!F[i][j]); x[i][j]=F[i][j]; y[i][j]=F[i][j]; } } for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { if(i) x[i][j]+=x[i-1][j]; if(j) y[i][j]+=y[i][j-1]; } } bool test=true; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { if(F[i][j]) continue; for (int k = 0; k < n; ++k) { for (int t = 0; t < n; ++t) { if(F[k][t]) continue; if(k==i&&t==j) continue; if(x[k][t]-(i ? x[i-1][t] : 0) + y[i][t]-(j ? y[i][j-1] : 0) > 0 && y[k][t]-(j ? y[k][j-1] : 0) + x[k][j] - (i ? x[i-1][j] : 0) > 0){ test=false; } } } } } if(test) return ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...