#include "soccer.h"
#include<bits/stdc++.h>
using namespace std;
int biggest_stadium(int n, std::vector<std::vector<int>> m){
int cnt = 0;
for(int i = 0;i < n;i++){
for(int j = 0;j < n;j++){
if(m[i][j])
continue;
cnt++;
bool aux = false;
for(int k = i-1;k >= 0;k--){
if(m[k][j])
aux = true;
else
if(aux){
//cout << i << ' ' << j << ' ' << 0 << ' ' << k << '\n';
return 0;
}
}
aux = false;
for(int k = i+1;k < n;k++){
if(m[k][j])
aux = true;
else
if(aux){
//cout << i << ' ' << j << ' ' << 0 << ' ' << k << '\n';
return 0;
}
}
aux = false;
for(int k = j-1;k >= 0;k--){
if(m[i][k])
aux = true;
else
if(aux){
//cout << i << ' ' << j << ' ' << 1 << ' ' << k << '\n';
return 0;
}
}
aux = false;
for(int k = j+1;k < n;k++){
if(m[i][k])
aux = true;
else
if(aux){
//cout << i << ' ' << j << ' ' << 1 << ' ' << k << '\n';
return 0;
}
}
}
}
return cnt;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |