답안 #843961

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
843961 2023-09-04T18:07:07 Z mihaibun 축구 경기장 (IOI23_soccer) C++17
컴파일 오류
0 ms 0 KB
#include <iostream>
#include <soccer.h>
using namespace std;

int biggest_stadium(int N, int F[][N])
{
    int i,j,x=0;
    for(i = 0; i < N; i++)
        for(j = 0; j < N; j++)
            if(F[i][j]==0) x++;
    return x;
}

Compilation message

soccer.cpp:5:37: error: use of parameter outside function body before ']' token
    5 | int biggest_stadium(int N, int F[][N])
      |                                     ^
soccer.cpp: In function 'int biggest_stadium(...)':
soccer.cpp:8:20: error: 'N' was not declared in this scope
    8 |     for(i = 0; i < N; i++)
      |                    ^
soccer.cpp:10:16: error: 'F' was not declared in this scope
   10 |             if(F[i][j]==0) x++;
      |                ^