Submission #723028

# Submission time Handle Problem Language Result Execution time Memory
723028 2023-04-13T07:36:58 Z dxz05 Flight to the Ford (BOI22_communication) C++17
0 / 100
197 ms 200 KB
#include"communication.h"
#include <bits/stdc++.h>

using namespace std;

void encode(int N, int X) {
    for (int i = 0; i < 30; i++){
        int t = (X >> i) & 1;
        if (!send(t)) send(t);
    }
}

pair<int, int> decode(int N) {
    int res = 0;
    for (int i = 0; i < 30; i++){
        if (receive()) res |= 1 << i;
    }
    return make_pair(res, res);
}
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 200 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 197 ms 200 KB Not correct
2 Halted 0 ms 0 KB -