Submission #1188421

#TimeUsernameProblemLanguageResultExecution timeMemory
1188421qwushaFlight to the Ford (BOI22_communication)C++20
0 / 100
266 ms2744 KiB
#include <bits/stdc++.h> using namespace std; #define fi first #define se second typedef long long ll; typedef long double ld; mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); #include"communication.h" void encode(int n, int x) { if (x == 1) { int last = 0; for (int i = 0; i < 250; i++) { int va = send(last); last = va; } } else { for (int i = 0; i < 250; i++) { int va = send(0); } } } pair<int, int> decode(int n) { bool ok = 1; int prev = 0; for (int i = 0; i < 250; i++) { int va = receive(); if (va == 1 && prev == 1) ok = 0; prev = va; } if (ok) { return {2, 3}; } else { return {1, 2}; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...