제출 #1117029

#제출 시각아이디문제언어결과실행 시간메모리
1117029ortsac앵무새 (IOI11_parrots)C++17
81 / 100
4 ms1516 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; void encode(int n, int v[]) { int val = -1; for (int i = 0; i < n; i++) { for (int j = 7; j >= 0; j--) { val++; if (v[i] & (1 << j)) send(val); } } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; void decode(int n, int l, int x[]) { vector<int> tem(256); for (int i = 0; i < l; i++) tem[x[i]] = 1; int val = -1; for (int i = 0; i < n; i++) { int curr = 0; for (int j = 7; j >= 0; j--) { val++; if (tem[val]) curr += (1 << j); } output(curr); } }
#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...