Submission #235255

#TimeUsernameProblemLanguageResultExecution timeMemory
235255DavidDamianParrots (IOI11_parrots)C++11
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { for(int i=0;i<N;i++){ int number=(M[i])? 1 : 3; number*=(1<<i); send(number); } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { vector<int> ans(N); for(int i=0;i<N;i++){ int number=x[i]; int power=0; int bit=0; while(number%2==0){ power++; number/=2; } bit=(number==3)? 0 : 1; ans[power]=bit; } for(int i=0;i<N;i++){ output(ans[i]); } }

Compilation message (stderr)

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:9:20: error: 'x' was not declared in this scope
         int number=x[i];
                    ^