답안 #839784

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
839784 2023-08-30T15:51:18 Z model_code 축구 경기장 (IOI23_soccer) C++17
1.5 / 100
261 ms 35064 KB
// incorrect/BM_wd_25%.cpp

#include "soccer.h"

int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
    int lastRow = 0;
    bool inc = true;
    int last1 = -1, last2 = -1, cnt = 0;
    for (int i = 0; i < N; i++)
    {
        lastRow = i;
        bool finish = false;
        int n1 = -1, n2 = -1;
        for (int j = 0; j < N; j++)
        {
            if (F[i][j] == 0)
            {
                if (finish)
                    return -1;
                if (n1 == -1)
                    n1 = j;
                n2 = j;
                cnt++;
            }
            else if (j > 0 && F[i][j - 1] == 0)
            {
                finish = true;
            }
        }
        if (n1 == -1)
        {
            if (last1 != -1)
                break;
        }
        else
        {
            if (last1 != -1)
            {
                if ((last1 < n1 && last2 < n2) || (last1 > n1 && last2 > n2))
                    return -1;
                if (!inc && (last1 > n1 || last2 < n2))
                    return -1;
                if (last1 < n1 || n2 < last2)
                    inc = false;
            }
            last1 = n1;
            last2 = n2;
        }
    }

    for (int i = lastRow + 1; i < N; i++)
    {
        for (int j = 0; j < N; j++)
        {
            if (F[i][j] == 0)
                return -1;
        }
    }

    return cnt;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB ok
2 Correct 0 ms 292 KB ok
3 Correct 0 ms 212 KB ok
4 Correct 0 ms 280 KB ok
5 Correct 0 ms 212 KB ok
6 Partially correct 1 ms 212 KB partial
7 Partially correct 1 ms 348 KB partial
8 Partially correct 18 ms 2496 KB partial
9 Partially correct 261 ms 35064 KB partial
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB ok
2 Correct 0 ms 292 KB ok
3 Partially correct 0 ms 212 KB partial
4 Partially correct 0 ms 212 KB partial
5 Incorrect 0 ms 288 KB wrong
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 1 ms 212 KB ok
3 Correct 0 ms 292 KB ok
4 Partially correct 0 ms 212 KB partial
5 Partially correct 0 ms 212 KB partial
6 Incorrect 0 ms 288 KB wrong
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 1 ms 212 KB ok
3 Correct 0 ms 292 KB ok
4 Correct 0 ms 212 KB ok
5 Correct 0 ms 280 KB ok
6 Partially correct 0 ms 212 KB partial
7 Partially correct 0 ms 212 KB partial
8 Incorrect 0 ms 288 KB wrong
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 1 ms 212 KB ok
3 Correct 0 ms 292 KB ok
4 Correct 0 ms 212 KB ok
5 Correct 0 ms 280 KB ok
6 Partially correct 0 ms 212 KB partial
7 Partially correct 0 ms 212 KB partial
8 Incorrect 0 ms 288 KB wrong
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB partial
2 Correct 1 ms 212 KB ok
3 Correct 0 ms 292 KB ok
4 Correct 0 ms 212 KB ok
5 Correct 0 ms 280 KB ok
6 Correct 0 ms 212 KB ok
7 Partially correct 1 ms 212 KB partial
8 Partially correct 1 ms 348 KB partial
9 Partially correct 18 ms 2496 KB partial
10 Partially correct 261 ms 35064 KB partial
11 Partially correct 0 ms 212 KB partial
12 Partially correct 0 ms 212 KB partial
13 Incorrect 0 ms 288 KB wrong
14 Halted 0 ms 0 KB -