Submission #258902

# Submission time Handle Problem Language Result Execution time Memory
258902 2020-08-06T17:28:58 Z amiratou Parrots (IOI11_parrots) C++14
81 / 100
3 ms 1536 KB
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>

using namespace std;

void encode(int N, int M[])
{
	for (int i = 0; i < N; ++i)
		for (int j = 0; j < 8; ++j)
			if((M[i]>>j)&1)send((i*8+j));
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>

using namespace std;

int ans[100];

void decode(int N, int L, int X[])
{
	memset(ans,0,sizeof ans);
	for(int i=0; i<L; i++) {
		//cerr<<X[i]/8<<","<<X[i]%8<<"\n";
		ans[X[i]/8]+=(1<<(X[i]%8));
	}
	for (int i = 0; i < N; ++i){
		//cerr<<ans[i]<<" ";
		output(ans[i]);
	}
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 940 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 1536 KB Output is correct
2 Correct 2 ms 1536 KB Output is correct
3 Correct 2 ms 1536 KB Output is correct
4 Correct 3 ms 1536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 1536 KB Output is correct
2 Correct 2 ms 1536 KB Output is correct
3 Correct 3 ms 1536 KB Output is correct
4 Correct 2 ms 1536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1536 KB Output is correct
2 Correct 2 ms 1536 KB Output is correct
3 Correct 3 ms 1536 KB Output is correct
4 Correct 3 ms 1536 KB Output is correct
5 Correct 3 ms 1536 KB Output is correct
6 Correct 3 ms 1536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 1536 KB Output is partially correct - P = 8.000000
2 Partially correct 3 ms 1536 KB Output is partially correct - P = 8.000000
3 Incorrect 0 ms 908 KB Error : Bad encoded integer
4 Incorrect 1 ms 912 KB Error : Bad encoded integer
5 Incorrect 0 ms 1008 KB Error : Bad encoded integer
6 Incorrect 0 ms 784 KB Error : Bad encoded integer
7 Incorrect 0 ms 1000 KB Error : Bad encoded integer