Submission #711471

#TimeUsernameProblemLanguageResultExecution timeMemory
711471nguyentunglamParrots (IOI11_parrots)C++17
0 / 100
2 ms1056 KiB
#include "encoder.h"
#include "encoderlib.h"
#include<bits/stdc++.h>
#define fi first
#define se second
#define endl "\n"
#define ii pair<int, int>
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>
#define fi first
#define se second
#define endl "\n"
#define ii pair<int, int>
using namespace std;
void decode(int n, int l, int x[]) {
    vector<int> a;
    a.resize(n + 1);
    for(int i = 0; i < l; i++) {
        int bit = x[i] % 8;
        int pos = x[i] / 8;
        a[bit] += (1 << pos);
    }
    for(int i = 0; i < n; i++) output(a[i]);
}

#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...