제출 #235313

#제출 시각아이디문제언어결과실행 시간메모리
235313DavidDamian앵무새 (IOI11_parrots)C++11
52 / 100
13 ms1792 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> using namespace std; void printBinary(int n) { for(int i=0;i<8;i++){ cout<<((n&(1<<i))? 1 : 0); } cout<<endl; } void encode(int N, int M[]) { for(int i=0;i<N;i++){ int number=i; for(int j=0;j<4;j++){ number=i; int binary_pos=j; binary_pos=(binary_pos<<4); number|=binary_pos; int aux=(1<<((j+1)*2))-1; aux=aux-((1<<((j)*2))-1); int segment=(M[i]&aux); segment=(segment>>(j*2)); segment=(segment<<6); number|=segment; send(number); } } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { vector<int> ans(N); for(int i=0;i<L;i++){ int idx=(X[i]%16); X[i]=(X[i]>>4); int part=X[i]%4; X[i]=(X[i]>>2); int x=X[i]<<(part*2); ans[idx]+=(X[i]<<(part*2)); } for(int i=0;i<N;i++){ output(ans[i]); } }

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

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:13:13: warning: unused variable 'x' [-Wunused-variable]
         int x=X[i]<<(part*2);
             ^
#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...