제출 #1175430

#제출 시각아이디문제언어결과실행 시간메모리
1175430dpsaveslivesFlight to the Ford (BOI22_communication)C++20
15 / 100
11 ms2852 KiB
#include "communication.h" using namespace std; void encode(int N, int X){ send((X==1)); send((X==2)); send((X==2)); send((X==1)); } pair<int,int> decode(int N){ bool b1 = receive(), b2 = receive(), b3 = receive(), b4 = receive(); if(b2 == b3){ if(b2){ return {1,2}; } return {1,3}; } if(b1 == b4){ if(b1) return {1,2}; return {2,3}; } if(b1 == b2){ return {1,2}; } return {2,3}; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...