제출 #555286

#제출 시각아이디문제언어결과실행 시간메모리
555286urosk동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#define maxn 5005
ll n;
ll a[maxn];
ll b[maxn];
ll c[maxn];
void exploreCave(int N) {
    n = N;
    for(ll i = 0;i<n;i++) b[i] = -1;
    for(ll i = 0;i<n;i++) c[i] = 0;
    if(tryCombination(c)==-1){
        for(ll i = 0;i<n;i++) c[i] = 1;
        for(ll i = 0;i<n;i++){
            ceri(b,0,n-1);
            for(ll j = 0;j<n;j++){
                if(b[j]!=-1) continue;
                c[j] = 0;
                ll e = tryCombination(c);
                //ceri(c,0,n-1);
                //cerr<<j<< "  "<<e<<endl;
                if(i==n-1){
                    if(e==-1){
                        b[j] = i;
                        answer(a,b);
                    }
                }else{
                    if(e>i){
                        b[j] = i;
                        goto lol;
                    }
                }
                c[j] = 1;
            }
            lol:;
        }
    }
}

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp:2:1: error: 'll' does not name a type
    2 | ll n;
      | ^~
cave.cpp:3:1: error: 'll' does not name a type
    3 | ll a[maxn];
      | ^~
cave.cpp:4:1: error: 'll' does not name a type
    4 | ll b[maxn];
      | ^~
cave.cpp:5:1: error: 'll' does not name a type
    5 | ll c[maxn];
      | ^~
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:7:5: error: 'n' was not declared in this scope
    7 |     n = N;
      |     ^
cave.cpp:8:9: error: 'll' was not declared in this scope
    8 |     for(ll i = 0;i<n;i++) b[i] = -1;
      |         ^~
cave.cpp:8:18: error: 'i' was not declared in this scope
    8 |     for(ll i = 0;i<n;i++) b[i] = -1;
      |                  ^
cave.cpp:8:27: error: 'b' was not declared in this scope
    8 |     for(ll i = 0;i<n;i++) b[i] = -1;
      |                           ^
cave.cpp:9:9: error: 'll' was not declared in this scope
    9 |     for(ll i = 0;i<n;i++) c[i] = 0;
      |         ^~
cave.cpp:9:18: error: 'i' was not declared in this scope
    9 |     for(ll i = 0;i<n;i++) c[i] = 0;
      |                  ^
cave.cpp:9:27: error: 'c' was not declared in this scope
    9 |     for(ll i = 0;i<n;i++) c[i] = 0;
      |                           ^
cave.cpp:10:23: error: 'c' was not declared in this scope
   10 |     if(tryCombination(c)==-1){
      |                       ^
cave.cpp:10:8: error: 'tryCombination' was not declared in this scope
   10 |     if(tryCombination(c)==-1){
      |        ^~~~~~~~~~~~~~
cave.cpp:11:13: error: 'll' was not declared in this scope
   11 |         for(ll i = 0;i<n;i++) c[i] = 1;
      |             ^~
cave.cpp:11:22: error: 'i' was not declared in this scope
   11 |         for(ll i = 0;i<n;i++) c[i] = 1;
      |                      ^
cave.cpp:12:13: error: 'll' was not declared in this scope
   12 |         for(ll i = 0;i<n;i++){
      |             ^~
cave.cpp:12:22: error: 'i' was not declared in this scope
   12 |         for(ll i = 0;i<n;i++){
      |                      ^
cave.cpp:13:18: error: 'b' was not declared in this scope
   13 |             ceri(b,0,n-1);
      |                  ^
cave.cpp:13:13: error: 'ceri' was not declared in this scope
   13 |             ceri(b,0,n-1);
      |             ^~~~
cave.cpp:14:19: error: expected ';' before 'j'
   14 |             for(ll j = 0;j<n;j++){
      |                   ^~
      |                   ;
cave.cpp:14:26: error: 'j' was not declared in this scope
   14 |             for(ll j = 0;j<n;j++){
      |                          ^
cave.cpp:17:19: error: expected ';' before 'e'
   17 |                 ll e = tryCombination(c);
      |                   ^~
      |                   ;
cave.cpp:21:24: error: 'e' was not declared in this scope
   21 |                     if(e==-1){
      |                        ^
cave.cpp:23:32: error: 'a' was not declared in this scope
   23 |                         answer(a,b);
      |                                ^
cave.cpp:23:25: error: 'answer' was not declared in this scope
   23 |                         answer(a,b);
      |                         ^~~~~~
cave.cpp:26:24: error: 'e' was not declared in this scope
   26 |                     if(e>i){
      |                        ^