Submission #72400

# Submission time Handle Problem Language Result Execution time Memory
72400 2018-08-26T07:44:55 Z (#2175, xdoju, kazel, pps789) Key of Impassable Doors (FXCUP3_key) C++17
Compilation error
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);
                                  ^