제출 #29095

#제출 시각아이디문제언어결과실행 시간메모리
29095aybala앵무새 (IOI11_parrots)C++11
81 / 100
8 ms2456 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> #define fori(a,b,c) for(a=b; a<c; a++) #define ford(a,b,c) for(a=b; a>=c; a--) #define mp make_pair #define pb push_back #define ll long long #define pii pair<int,int> using namespace std; void encode(int N, int M[]) { int i; for(i=0; i<N; i++){ int x=2; int y=0; while(M[i]){ if(M[i]%x){ send(i*8+y); M[i]-=(x/2); } y++; x*=2; } } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> #define fori(a,b,c) for(a=b; a<c; a++) #define ford(a,b,c) for(a=b; a>=c; a--) #define mp make_pair #define pb push_back #define ll long long #define pii pair<int,int> using namespace std; int us[8]={1,2,4,8,16,32,64,128}; void decode(int N, int L, int X[]) { sort(X,X+L); int i,j,k; j=0; fori(i,0,N){ int cod=0; while(j<L && X[j]<=i*8+7){ X[j]-=i*8; cod+=us[X[j]]; j++; } output(cod); } }

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

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:17:10: warning: unused variable 'k' [-Wunused-variable]
  int i,j,k;
          ^
#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...