#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |