제출 #1187695

#제출 시각아이디문제언어결과실행 시간메모리
1187695MatteoArcari축구 경기장 (IOI23_soccer)C++20
6 / 100
190 ms31772 KiB
#include "soccer.h"
#include <bits/stdc++.h>
using namespace std;

int biggest_stadium(int n, vector<vector<int>> f) {
    int x = -1, y = -1;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (f[i][j]) {
                x = i; y = j;
            }
        }
    }
    int ans = 0;
    if (x != -1) {
        ans = max(ans, n * n - (x + 1) * (y + 1));
        ans = max(ans, n * n - (x + 1) * (n - y));
        ans = max(ans, n * n - (n - x) * (y + 1));
        ans = max(ans, n * n - (n - x) * (n - y));
    } else {
        ans = n * n;
    }
    return ans;
}
#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...