Submission #29140

# Submission time Handle Problem Language Result Execution time Memory
29140 2017-07-18T11:24:26 Z dereotu Parrots (IOI11_parrots) C++14
0 / 100
6 ms 2080 KB
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define forr(i,A,B) for(int i=A;i<B;++i)
#define space ' '
#define endl '\n'
#define LL long long
using namespace std;

void encode(int N, int M[])
{
  	int i;
	int zero=0,one=0;
	for(i=0; i<N; i++){
		if(M[i]==0){
			zero++;
			send(M[i]);
		}
		else{
			one++;
			send(one+zero);
		}
	}

}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define forr(i,A,B) for(int i=A;i<B;++i)
#define space ' '
#define endl '\n'
#define LL long long
using namespace std;

int b[8];
void decode(int N, int L, int X[])
{
	forr(i,0,N){
		if(X[i]){
			b[X[i]-1]=1;
		}
	}
	forr(i,0,N){
		output(b[i]?1:0);
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 756 KB Error : Output is wrong
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1632 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1632 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1696 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1800 KB Error : Output is wrong
2 Incorrect 5 ms 1800 KB Error : Output is wrong
3 Incorrect 5 ms 1840 KB Error : Output is wrong
4 Incorrect 6 ms 1968 KB Error : Output is wrong
5 Incorrect 5 ms 2016 KB Error : Output is wrong
6 Incorrect 5 ms 2048 KB Error : Output is wrong
7 Incorrect 6 ms 2080 KB Error : Output is wrong