Submission #64162

# Submission time Handle Problem Language Result Execution time Memory
64162 2018-08-03T12:23:56 Z zubec Parrots (IOI11_parrots) C++14
81 / 100
11 ms 2616 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++){
        int x = M[i];
        for (int j = 0; j < 8; j++){
            if (x & (1<<j)){
                int curmask = i | (j << 5);
                send(curmask);
            }
        }
    }
}

#include "decoder.h"
#include "decoderlib.h"

#include <bits/stdc++.h>
using namespace std;

int ans[100];

void decode(int N, int L, int X[]){
    for (int i = 0; i < N; i++)
        ans[i] = 0;
    for (int i = 0; i < L; i++){
        ans[X[i]&((1<<5)-1)] |= (1<<(X[i]>>5));
    }
    for (int i = 0; i < N; i++)
        output(ans[i]);
}
# Verdict Execution time Memory Grader output
1 Correct 6 ms 752 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 1744 KB Output is correct
2 Correct 7 ms 1936 KB Output is correct
3 Correct 7 ms 1976 KB Output is correct
4 Correct 6 ms 1976 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 2056 KB Output is correct
2 Correct 7 ms 2088 KB Output is correct
3 Correct 8 ms 2088 KB Output is correct
4 Correct 8 ms 2120 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 2216 KB Output is correct
2 Correct 8 ms 2240 KB Output is correct
3 Correct 10 ms 2264 KB Output is correct
4 Correct 8 ms 2496 KB Output is correct
5 Correct 9 ms 2496 KB Output is correct
6 Correct 9 ms 2496 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 7 ms 2496 KB Output is partially correct - P = 8.000000
2 Partially correct 11 ms 2496 KB Output is partially correct - P = 8.000000
3 Incorrect 9 ms 2496 KB Error : Output is wrong
4 Incorrect 10 ms 2496 KB Error : Output is wrong
5 Incorrect 10 ms 2496 KB Error : Output is wrong
6 Incorrect 10 ms 2616 KB Error : Output is wrong
7 Incorrect 9 ms 2616 KB Error : Output is wrong