제출 #14826

#제출 시각아이디문제언어결과실행 시간메모리
14826minsu앵무새 (IOI11_parrots)C++14
17 / 100
6 ms2272 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; void encode(int N, int M[]) { for(int i=0; i<N; i++){ int a = M[i] / 100; int b = M[i] / 10 % 10; int c = M[i] % 10; while( a!=0 || b!=0 || c!=0 ){ int s = i<<3; if(a) s |= 4, a--; if(b) s |= 2, b--; if(c) s |= 1, c--; send( s ); } } send( (N-1)<<3 ); }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { int i, b, n=0; vector<int> m(111); for(i=0; i<L; i++) { m[ X[i]>>3 ] += (X[i]&4)*100 + (X[i]&2)*10 + (X[i]&1); n = max( n, X[i]>>3 ); } for(i=0; i<=n; i++) output( m[i] ); }

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

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:9:10: warning: unused variable 'b' [-Wunused-variable]
   int i, b, n=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...