Submission #29137

# Submission time Handle Problem Language Result Execution time Memory
29137 2017-07-18T11:13:02 Z dereotu Parrots (IOI11_parrots) C++14
0 / 100
5 ms 2232 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;

void decode(int N, int L, int X[])
{
	int b[N];
	sort(X,X+N,greater<int>());
	forr(i,0,N){
		if(X[i]){
			b[X[i]]=1;
		}
	}
	forr(i,0,N){
		output(b[i]?1:0);
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 752 KB Error : Output is wrong
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1592 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 1696 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 Incorrect 5 ms 1696 KB Error : Output is wrong
3 Incorrect 5 ms 2152 KB Error : Output is wrong
4 Incorrect 5 ms 2152 KB Error : Output is wrong
5 Incorrect 5 ms 2152 KB Error : Output is wrong
6 Incorrect 5 ms 2232 KB Error : Output is wrong
7 Incorrect 5 ms 2232 KB Error : Output is wrong