제출 #436021

#제출 시각아이디문제언어결과실행 시간메모리
436021chirathnirodha앵무새 (IOI11_parrots)C++17
52 / 100
5 ms1036 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> using namespace std; #define MP make_pair #define PB push_back #define F first #define S second void encode(int N, int M[]){ if(N<=16){ for(int i=0;i<N;i++){ for(int j=0;j<8;j++){ int x=i; x=x<<3;x+=j; x=x<<1;x+=M[i]%2; M[i]/=2; send(x); } } } return; }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> #include <cmath> using namespace std; #define MP make_pair #define PB push_back #define F first #define S second int funcpow(int x,int y){ int a=1; for(int i=0;i<y;i++)a*=x; return a; } void decode(int N, int L, int X[]){ int arr[N];memset(arr,0,sizeof(arr)); for(int i=0;i<L;i++){ int c=X[i]%2; X[i]=X[i]>>1; int b=X[i]%8; X[i]=X[i]>>3; int a=X[i]; arr[a]+=funcpow(2,b)*c; } for(int i=0;i<N;i++)output(arr[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...