# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1175430 | dpsaveslives | Flight to the Ford (BOI22_communication) | C++20 | 11 ms | 2852 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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |