제출 #122994

#제출 시각아이디문제언어결과실행 시간메모리
122994CaroLinda앵무새 (IOI11_parrots)C++14
17 / 100
6 ms1528 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" #define lp(i,a,b) for(int i=a;i<b;i++) #define MAX 70 using namespace std; int qtd[8] = {1,2,1,2,1,2,1,2} ; void encode(int n , int m[] ) { if(n <= 32 ) lp(i,0,8) qtd[i] = 1 ; lp(i,0,n) lp(j,0,8) if( (m[i] & (1<<j) ) != 0 ) lp(k,0,qtd[j]) send(8*i+j-j%2) ; }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" #define lp(i,a,b) for(int i=a;i<b;i++) #define MAX 70 using namespace std; void decode(int n , int l , int x[]) { int seq[MAX] ; lp(i,0,n) seq[i] = 0 ; lp(i,0,l) seq[ x[i]/8 ] += (1<<(x[i]%8)) ; lp(i,0,n) output(seq[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...