답안 #72397

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72397 2018-08-26T07:43:46 Z (#2175, xdoju, kazel, pps789) 통행이 제한된 저택 (FXCUP3_key) C++17
컴파일 오류
0 ms 0 KB
#include"key.h"

static A[111][111];

void EnsureKeyInfo(int N){
    for(int i=1;i<=N;i++) for(int j=i+1;j<=N;j++){
        TakeKey(i), TakeKey(j);
        A[i][j] = A[j][i] = Explore();
    }
    for(int i=1;i<=N;i++){
        TakeKey(i);
        int cur = Explore();
        for(int j=1;j<=N;j++) if(A[i][j]==cur) Report(i,j);
    }

    for(int i=1;i<=N;i++) Report(i,i);
}

Compilation message

key.cpp:3:8: error: 'A' does not name a type
 static A[111][111];
        ^
key.cpp: In function 'void EnsureKeyInfo(int)':
key.cpp:8:9: error: 'A' was not declared in this scope
         A[i][j] = A[j][i] = Explore();
         ^
key.cpp:13:34: error: 'A' was not declared in this scope
         for(int j=1;j<=N;j++) if(A[i][j]==cur) Report(i,j);
                                  ^