Submission #723028

#TimeUsernameProblemLanguageResultExecution timeMemory
723028dxz05Flight to the Ford (BOI22_communication)C++17
0 / 100
197 ms200 KiB
#include"communication.h" #include <bits/stdc++.h> using namespace std; void encode(int N, int X) { for (int i = 0; i < 30; i++){ int t = (X >> i) & 1; if (!send(t)) send(t); } } pair<int, int> decode(int N) { int res = 0; for (int i = 0; i < 30; i++){ if (receive()) res |= 1 << i; } return make_pair(res, res); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...