제출 #668429

#제출 시각아이디문제언어결과실행 시간메모리
668429finn__앵무새 (IOI11_parrots)C++17
81 / 100
5 ms1156 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { for (unsigned i = 0; i < N; i++) for (unsigned j = 0; j < 8; j++) if (M[i] & (1 << j)) send((j << 5) | i); }
#include "decoder.h" #include "decoderlib.h" #include <memory.h> void decode(int N, int L, int X[]) { int M[N]; memset(M, 0, N * sizeof(int)); for (unsigned i = 0; i < L; i++) M[X[i] & 31] |= (1 << (X[i] >> 5)); for (unsigned i = 0; i < N; i++) output(M[i]); }

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

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:6:28: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
    6 |     for (unsigned i = 0; i < N; i++)
      |                          ~~^~~

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:9:28: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
    9 |     for (unsigned i = 0; i < L; i++)
      |                          ~~^~~
decoder.cpp:11:28: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
   11 |     for (unsigned i = 0; i < N; 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...