제출 #770458

#제출 시각아이디문제언어결과실행 시간메모리
770458kad_01앵무새 (IOI11_parrots)C++14
24 / 100
6 ms1380 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { for (int i = 0; i < N; i++) { for (int j = 0; j < (M[i] >> 6); j++) { send(4 * i); } for (int j = 0; j < ((M[i] >> 4) & 3); j++) { send(4 * i + 1); } for (int j = 0; j < ((M[i] >> 2) & 3); j++) { send(4 * i + 2); } int k = M[i] & 3; for (int j = 0; j < (M[i] & 3); j++) { send(4 * i + 3); } } }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, int X[]) { int freq[256]; for(int i = 0; i < 256; i++) { freq[i] = 0; } for(int i = 0; i < L; i++) { freq[X[i]]++; } for(int i = 0; i < N; i++) { output( freq[4 * i] << 6 | freq[4 * i + 1] << 4 | freq[4 * i + 2] << 2 | freq[4 * i + 3] ); } }

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

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