Submission #711472

#TimeUsernameProblemLanguageResultExecution timeMemory
711472nguyentunglamParrots (IOI11_parrots)C++17
81 / 100
3 ms1168 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> #define fi first #define se second #define endl "\n" #define ii pair<int, int> using namespace std; void encode(int n, int m[]) { for(int i = 0; i < n; i++) { for(int j = 0; j < 8; j++) if ((m[i] >> j) & 1) { send(i * 8 + j); } } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> #define fi first #define se second #define endl "\n" #define ii pair<int, int> using namespace std; int a[110]; void decode(int n, int l, int x[]) { for(int i = 0; i < n; i++) a[i] = 0; for(int i = 0; i < l; i++) { int bit = x[i] % 8; int pos = x[i] / 8; a[pos] += (1 << bit); } for(int i = 0; i < n; i++) output(a[i]); }
#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...