제출 #199149

#제출 시각아이디문제언어결과실행 시간메모리
199149godwind앵무새 (IOI11_parrots)C++14
52 / 100
11 ms1520 KiB
#include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int n, int M[]) { for (int i = 0; i < n; ++i) { int x = i * 16; send(i * 16 + 4 * 0 + M[i] % 4); send(i * 16 + 4 * 1 + (M[i] >> 2) % 4); send(i * 16 + 4 * 2 + (M[i] >> 4) % 4); send(i * 16 + 4 * 3 + (M[i] >> 6) % 4); } }
#include "decoder.h" #include "decoderlib.h" using namespace std; int ans[1000]; void decode(int n, int L, int X[]) { for (int i = 0; i < n; ++i) { ans[i] = 0; } for (int i = 0; i < L; ++i) { int id = X[i] >> 4; int r = (X[i] >> 2) % 4; ans[id] += (1 << (2 * r)) * (X[i] % 4); } for (int i = 0; i < n; ++i) { output(ans[i]); } }

컴파일 시 표준 에러 (stderr) 메시지

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:10:7: warning: unused variable 'x' [-Wunused-variable]
   int x = i * 16;
       ^
#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...