Submission #71118

#TimeUsernameProblemLanguageResultExecution timeMemory
71118AlphaRazraParrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define mp make_pair #define fs first #define sc second #define pb push_back #define debug(x) cout<<#x<<" = "<<(x)<<endl #define mod 998244353 #define INF 1e18 #include "encoder.h" using namespace std; void encode(int N, int M[]){ for(int i = 0; i < N; i++){ for(int j = 0; j < 8; j++){ int now = (1 << j); int idx = 8 * i + j; if(i >= 32){ idx = 8 * (i - 32) + j; } if((now & M[i]) > 0){ if(i < 32){ send(idx); }else{ send(idx); send(idx); } } } } }
#include<bits/stdc++.h> #define mp make_pair #define fs first #define sc second #define pb push_back #define debug(x) cout<<#x<<" = "<<(x)<<endl #define mod 998244353 #define INF 1e18 #include "decoder.h" using namespace std; void decode(int N, int L, int X[]){ int ans[65]; int nyak[300]; memset(ans, 0, sizeof(ans)); memset(nyak, 0, sizeof(nyak)); for(int i = 0; i < L; i++){ nyak[X[i]]++; } for(int i = 0; i < 256; i++){ if(nyak[i] == 0){ continue; }else if(nyak[i] == 1){ int pos = i / 8; int idx = i % 8; ans[pos] = ans[pos] + (1 << idx); }else if(nyak[i] == 2){ int pos = (i / 8) + 32; int idx = i % 8; ans[pos] = ans[pos] + (1 << idx); }else{ int pos = i / 8; int idx = i % 8; ans[pos] = ans[pos] + (1 << idx); pos = (i / 8) + 32; idx = i % 8; ans[pos] = ans[pos] + (1 << idx); } } for(int i = 0; i < N; i++){ output(ans[i]); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:25:6: error: 'send' was not declared in this scope
      send(idx);
      ^~~~
encoder.cpp:25:6: note: suggested alternative: 'setns'
      send(idx);
      ^~~~
      setns
encoder.cpp:27:6: error: 'send' was not declared in this scope
      send(idx);
      ^~~~
encoder.cpp:27:6: note: suggested alternative: 'setns'
      send(idx);
      ^~~~
      setns

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:47:3: error: 'output' was not declared in this scope
   output(ans[i]);
   ^~~~~~
decoder.cpp:47:3: note: suggested alternative: 'getpt'
   output(ans[i]);
   ^~~~~~
   getpt