Submission #799249

#TimeUsernameProblemLanguageResultExecution timeMemory
799249LiudasParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "decoder.h" using namespace std; /* int ord[100000] = {0}, seq[1000000] = {0}; int p = 0, pp = 0; void send(int x){ ord[p++] = x; } void output(int x){ seq[pp++] = x; } */ void encode(int N, int M[]){ for(int i = 0; i < N; i ++){ send(1000 * i + M[i]); } } void decode(int N, int L, int X[]){ map<int, int> arr; for(int i = 0; i < L; i++){ arr[X[i]]++; } for(int i = 0; i < N; i ++){ for(auto [l, r] : arr){ if(l / 1000 == i){ output(l % 1000); break; } } } }
#include <bits/stdc++.h> #include "encoder.h" #include "decoder.h" using namespace std; /* int ord[100000] = {0}, seq[1000000] = {0}; int p = 0, pp = 0; void send(int x){ ord[p++] = x; } void output(int x){ seq[pp++] = x; } */ void encode(int N, int M[]){ for(int i = 0; i < N; i ++){ send(1000 * i + M[i]); } } void decode(int N, int L, int X[]){ map<int, int> arr; for(int i = 0; i < L; i++){ arr[X[i]]++; } for(int i = 0; i < N; i ++){ for(auto [l, r] : arr){ if(l / 1000 == i){ output(l % 1000); break; } } } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:17:9: error: 'send' was not declared in this scope
   17 |         send(1000 * i + M[i]);
      |         ^~~~
encoder.cpp: In function 'void decode(int, int, int*)':
encoder.cpp:28:17: error: 'output' was not declared in this scope
   28 |                 output(l % 1000);
      |                 ^~~~~~

decoder.cpp: In function 'void encode(int, int*)':
decoder.cpp:17:9: error: 'send' was not declared in this scope
   17 |         send(1000 * i + M[i]);
      |         ^~~~
decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:28:17: error: 'output' was not declared in this scope
   28 |                 output(l % 1000);
      |                 ^~~~~~