Submission #1121927

#TimeUsernameProblemLanguageResultExecution timeMemory
1121927WansurFlight to the Ford (BOI22_communication)C++17
15 / 100
88 ms3080 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...