답안 #928115

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
928115 2024-02-15T20:54:28 Z aykhn 축구 경기장 (IOI23_soccer) C++17
0 / 100
4500 ms 2908 KB
#include <bits/stdc++.h>
#include "soccer.h"

using namespace std;

int biggest_stadium(int n, vector<vector<int>> A)
{
    int res = 0;
    for (int x = 0; x < n; x++)
    {
        for (int y = 0; y < n; y++)
        {
            if (A[x][y]) continue;
            int l1, r1, l2, r2;
            for (int k = y; k >= 0; k--)
            {
                if (A[x][k]) break;
                l1 = l2 = k;
            }
            for (int k = y; k < n; k++)
            {
                if (A[x][k]) break;
                r1 = r2 = k;
            }
            int c = 0;
            for (int i = x; i >= 0; i--)
            {
                if (A[i][y]) break;
                for (int j = y; j >= l1; j--)
                {
                    if (A[i][j]) 
                    {
                        l1 = j + 1;
                        break;
                    }
                    c++;
                }
                for (int j = y + 1; j <= r1; j++)
                {
                    if (A[i][j])
                    {
                        r1 = j - 1;
                        break;
                    }
                    c++;
                }
            }
            for (int i = x + 1; i < n; i++)
            {
                if (A[i][y]) break;
                for (int j = y; j >= l2; j--)
                {
                    if (A[i][j]) 
                    {
                        l2 = j + 1;
                        break;
                    }
                    c++;
                }
                for (int j = y + 1; j <= r2; j++)
                {
                    if (A[i][j])
                    {
                        r2 = j - 1;
                        break;
                    }
                    c++;
                }
            }
            res = max(res, c);
        }
    }
    return res;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB ok
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB ok
2 Correct 0 ms 348 KB ok
3 Correct 0 ms 348 KB ok
4 Correct 0 ms 344 KB ok
5 Correct 0 ms 348 KB ok
6 Correct 0 ms 436 KB ok
7 Correct 68 ms 600 KB ok
8 Execution timed out 4562 ms 2908 KB Time limit exceeded
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB ok
2 Correct 0 ms 348 KB ok
3 Correct 0 ms 348 KB ok
4 Correct 0 ms 348 KB ok
5 Correct 0 ms 348 KB ok
6 Correct 0 ms 348 KB ok
7 Incorrect 0 ms 348 KB wrong
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB ok
2 Correct 0 ms 348 KB ok
3 Correct 0 ms 348 KB ok
4 Correct 0 ms 348 KB ok
5 Correct 0 ms 348 KB ok
6 Correct 0 ms 348 KB ok
7 Correct 0 ms 348 KB ok
8 Incorrect 0 ms 348 KB wrong
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB ok
2 Correct 0 ms 348 KB ok
3 Correct 0 ms 348 KB ok
4 Correct 0 ms 348 KB ok
5 Correct 0 ms 344 KB ok
6 Correct 0 ms 348 KB ok
7 Correct 0 ms 348 KB ok
8 Correct 0 ms 348 KB ok
9 Correct 0 ms 348 KB ok
10 Incorrect 0 ms 348 KB wrong
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB ok
2 Correct 0 ms 348 KB ok
3 Correct 0 ms 348 KB ok
4 Correct 0 ms 348 KB ok
5 Correct 0 ms 344 KB ok
6 Correct 0 ms 348 KB ok
7 Correct 0 ms 348 KB ok
8 Correct 0 ms 348 KB ok
9 Correct 0 ms 348 KB ok
10 Incorrect 0 ms 348 KB wrong
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB ok
2 Correct 0 ms 348 KB ok
3 Correct 0 ms 348 KB ok
4 Correct 0 ms 348 KB ok
5 Correct 0 ms 344 KB ok
6 Correct 0 ms 348 KB ok
7 Correct 0 ms 436 KB ok
8 Correct 68 ms 600 KB ok
9 Execution timed out 4562 ms 2908 KB Time limit exceeded
10 Halted 0 ms 0 KB -