| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1370384 | dssfsuper2 | Soccer Stadium (IOI23_soccer) | C++20 | 130 ms | 31768 KiB |
#include "soccer.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
using pii = pair<int, int>;
int biggest_stadium(int N, vector<vector<int>> F){
vector<pii> sps;
int tot=0;
for(int i =0;i<N;i++){
for(int j = 0;j<N;j++)if(F[i][j]==0)tot++;
int fl=N+1;
for(int j = 0;j<N;j++){
if(F[i][j]==0){
fl=j;
break;
}
}
int sl=-1;
for(int j=N-1;j>=0;j--){
if(F[i][j]==0){
sl=j;
break;
}
}
if(sl==-1)sps.push_back({-1, -1});
else{
sps.push_back({fl, sl});
for(int j = fl;j<=sl;j++)if(F[i][j]!=0)return 0;
}
}
while(sps.back().first==-1)sps.pop_back();
reverse(all(sps));
while(sps.back().first==-1)sps.pop_back();
for(int i = 0;i<sps.size();i++)if(sps[i].first==-1)return 0;
for(int i = 0;i<sps.size();i++){
for(int j = i+1;j<sps.size();j++){
pii f = sps[i];
pii s = sps[j];
if((s.first>=f.first && s.second<=f.second) || (s.first<=f.first && s.second>=f.second))continue;
else return 0;
}
}
return tot;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
