제출 #423105

#제출 시각아이디문제언어결과실행 시간메모리
423105arayi앵무새 (IOI11_parrots)C++17
96 / 100
10 ms1340 KiB
#include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int N, int M[]) { for (int i = 0; i < N; i++) { for (int j = 0; j < 4; j++) { int s = 1; if ((1 << j) & M[i]) s--; if ((1 << (j + 4)) & M[i]) s += 2; while (s--) send(i * 4 + j); } } }
#include "decoder.h" #include "decoderlib.h" #include <iostream> using namespace std; int cl[100][4], col[100]; void decode(int N, int L, int X[]) { //cout << N << endl; for (int i = 0; i < L; i++) cl[X[i] / 4][X[i] % 4]++; for (int i = 0; i < N; i++) { for (int j = 0; j < 4; j++) { int sm = cl[i][j]; if ((sm & 1) == 0) col[i] += (1 << j); if (sm & 2) col[i] += (1 << (j + 4)); cl[i][j] = 0; } } for (int i = 0; i < N; i++) output(col[i]), col[i] = 0; }
#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...