제출 #960321

#제출 시각아이디문제언어결과실행 시간메모리
960321LCJLY앵무새 (IOI11_parrots)C++14
81 / 100
3 ms1336 KiB
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;

#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << "  " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << "  " << j << " " << #i << "  " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<long long,int>pii;

//encoder
void encode(int n, int m[]){
	for(int x=0;x<n;x++){
		int index=x;
		for(int y=0;y<8;y++){
			if(m[x]&(1<<y)){
				int hold=(index<<3)+y;
				send(hold);
			}	
		}
	}
}
//encoder
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;

#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << "  " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << "  " << j << " " << #i << "  " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<long long,int>pii;

//decoder
void decode(int n, int l, int arr[]){
	int ans[n];
	memset(ans,0,sizeof(ans));
	for(int x=0;x<l;x++){
		int index=arr[x]>>3;
		int bit=arr[x]%(1<<3);
		ans[index]+=1<<bit;
	}
	
	for(int x=0;x<n;x++) output(ans[x]);
}
//decoder
#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...