Submission #1231655

#TimeUsernameProblemLanguageResultExecution timeMemory
1231655ericl23302Soccer Stadium (IOI23_soccer)C++20
6 / 100
194 ms31772 KiB
#include "soccer.h"
#include <bits/stdc++.h>

using namespace std;

int biggest_stadium(int N, std::vector<std::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;
                break;
            }
        }
        if (x != -1) break;
    }

    if (x == -1) return N * N;

    return max(max(x * N + y * N - x * y, x * N + (N - y - 1) * N - x * (N - y - 1)), max((N - x - 1) * N + y * N - (N - x - 1) * y, (N - x - 1) * N + (N - y - 1) * N - (N - x - 1) * (N - y - 1)));
}
#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...