# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1059663 | tolbi | Soccer Stadium (IOI23_soccer) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "soccer.h"
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
int x=-1,y=-1;
for (int i =0 ; i < F.size(); i++){
for (int j = 0; j < F[i].size(); j++){
if (F[i][j]==1){
x=i,y=j;
}
}
}
if (x==-1){
return N*N;
}
else {
return N*N-min(x+1,N-x)*min(y+1,N-y);
}
}