# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
23623 |
2017-05-17T10:49:01 Z |
Hiasat |
Parrots (IOI11_parrots) |
C++14 |
|
5 ms |
2096 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 bit = 0; bit <= 0 ; bit++) {
int cur = 0;
int rem = i;
for (int j = 6 ; j >= 0 ; j--) {
if (rem >= (1 << j)) {
cur = cur | ( 1 << j);
rem -= (1 << j);
}
}
cur = cur | ((M[i] & (1 << bit)) ? (1 << 7) : 0);
send(cur);
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
int ans[310];
void decode(int N, int L, int X[])
{
for(int i=0; i<L; i++) {
bool bit = (X[i] & (1 << 7));
int nw = X[i] - (1 << 7)*bit;
ans[nw] = bit;
}
for (int i = 0; i < N; ++i){
output(ans[i] * 1);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
756 KB |
Output is correct |
# |
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 |
1752 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
1784 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
1784 KB |
Error : Output is wrong |
2 |
Incorrect |
5 ms |
1784 KB |
Error : Output is wrong |
3 |
Incorrect |
5 ms |
1880 KB |
Error : Output is wrong |
4 |
Incorrect |
5 ms |
1912 KB |
Error : Output is wrong |
5 |
Incorrect |
5 ms |
2032 KB |
Error : Output is wrong |
6 |
Incorrect |
5 ms |
2096 KB |
Error : Output is wrong |
7 |
Incorrect |
5 ms |
2096 KB |
Error : Output is wrong |