Submission #122991

#TimeUsernameProblemLanguageResultExecution timeMemory
122991CaroLindaParrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" #define lp(i,a,b) for(int i=a;i<b;i++) #define MAX 70 using namespace std; int qtd[8] = {1,2,1,2,1,2,1,2} ; void encode(int n , int m[] ) { lp(i,0,n) lp(j,0,8) if( (m[i] & (1<<j) ) != 0 ) lp(k,0,qtd[j]) send(8*i+j-j%2) ; }
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" #define lp(i,a,b) for(int i=a;i<b;i++) #define MAX 70 using namespace std; void decode(int n , int l , int x[]) { int seq[MAX] ; lp(i,0,n) seq[i] = 0 ; lp(i,0,l) seq[ x[i]/8 ] += (1<<(x[i]%8)) ; lp(i,0,n) output(seq[i]) ; }

Compilation message (stderr)

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:16:15: error: 'output' was not declared in this scope
     lp(i,0,n) output(seq[i]) ;
               ^~~~~~
decoder.cpp:16:15: note: suggested alternative: 'getpt'
     lp(i,0,n) output(seq[i]) ;
               ^~~~~~
               getpt