제출 #117281

#제출 시각아이디문제언어결과실행 시간메모리
117281nvmdava앵무새 (IOI11_parrots)C++17
컴파일 에러
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]){ int i; for(i=0; i<N; i++){ send(M[i]); send(M[i] ^ i); send(M[i] ^ i ^ 63); send(M[i] ^ 255); send(M[i] ^ i ^ 255) } }
#include "decoder.h" #include "decoderlib.h" int a[65]; void decode(int N, int L, int X[]) { multiset<int> in; int i; for(i=0; i<L; i++){ in.insert(X[i]); //output(b); } while(!in.empty()){ for(int x : in){ bool ok = 0; for(int i = 0; i < N; i++){ if(!in.count(x ^ i)) continue; ok = 1; a[i] = x; in.erase(in.find(x)); in.erase(in.find(x ^ i)); } if(ok) break; } } for(int i = 0; i < N; i++){ output(a[i]); } }

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

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:12:3: error: expected ';' before '}' token
   }
   ^

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:8:3: error: 'multiset' was not declared in this scope
   multiset<int> in;
   ^~~~~~~~
decoder.cpp:8:12: error: expected primary-expression before 'int'
   multiset<int> in;
            ^~~
decoder.cpp:11:5: error: 'in' was not declared in this scope
     in.insert(X[i]);
     ^~
decoder.cpp:11:5: note: suggested alternative: 'i'
     in.insert(X[i]);
     ^~
     i
decoder.cpp:14:11: error: 'in' was not declared in this scope
    while(!in.empty()){
           ^~
decoder.cpp:14:11: note: suggested alternative: 'i'
    while(!in.empty()){
           ^~
           i
decoder.cpp:15:19: error: unable to deduce 'auto&&' from 'in'
       for(int x : in){
                   ^~