Submission #1121920

#TimeUsernameProblemLanguageResultExecution timeMemory
1121920vjudge1Flight to the Ford (BOI22_communication)C++17
15 / 100
80 ms3076 KiB
#include"communication.h" void encode(int n, int x) { send((x == 1)); send((x == 2)); send((x == 2)); send((x == 1)); } std::pair<int, int> decode(int N) { bool a = receive(), b = receive(), c = receive(), d = receive(); if(b == c) { if(b) { return {1, 2}; } return {1, 3}; } if(a == d) { if(a) { return {1, 2}; } return {2, 3}; } if(a == b) { return {1, 2}; } return {2, 3}; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...