Submission #1178798

#TimeUsernameProblemLanguageResultExecution timeMemory
1178798IskachunFlight to the Ford (BOI22_communication)C++20
0 / 100
4 ms2712 KiB
#include<vector>
#include<cstdio>
#include<set>
#include<cstdlib>
#include<cstdarg>
#include<cassert>
using namespace std;

#include "communication.h"


void encode(int N, int x) {
    int a = 0, b = 0;
    if (x == 1) a = send(0), b = send(0);
    else if (x == 2) a = send(0), b = send(1);
    else a = send(1), b = send(1);
    if (a and b == 0) {

    }
}

pair<int, int> decode(int N) {
    int a = receive(), b = receive();
    if (a == 0 and b == 0) return {1, 2};
    if (a == 1 and b == 1) return {2, 3};
    if (a == 0 and b == 1) return {1, 3};
    return {1, 2};
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...