Submission #799251

#TimeUsernameProblemLanguageResultExecution timeMemory
799251LiudasParrots (IOI11_parrots)C++17
34 / 100
1 ms1044 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.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]); } }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.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 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; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...