| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1163860 | Mousa_Aboubaker | Soccer Stadium (IOI23_soccer) | C++20 | 198 ms | 31876 KiB |
#include "soccer.h"
#include <bits/stdc++.h>
using namespace std;
int biggest_stadium(int n, std::vector<std::vector<int>> v)
{
int trees = 0;
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
trees += v[i][j];
}
}
if(trees == 1)
{
std::pair<int, int> idx;
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
if(v[i][j] == 1)
{
idx = {i+1, j+1};
}
}
}
int res1 = n * n - idx.first * idx.second;
int res2 = n * n - (n - idx.first + 1) * (n - idx.second + 1);
int res3 = n * n - (n - idx.first + 1) * idx.second;
int res4 = n * n - idx.first * (n - idx.second + 1);
return max({res1, res2, res3, res4});
}
return n * n - trees;
}| # | 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... | ||||
