제출 #775051

#제출 시각아이디문제언어결과실행 시간메모리
775051cheat_when_I_was_youngShopping (JOI21_shopping)C++17
0 / 100
1 ms268 KiB
#include "Anna.h" #include "bits/stdc++.h" using namespace std; int ans; void InitA(int n, int l, int r) { for (int i = 0; i < 9; ++i) SendA(bool(l & (1<<i))); for (int i = 0; i < 9; ++i) SendA(bool(r & (1<<i))); } void ReceiveA(bool x) { for (int i = 0; i <= 9; ++i) ans |= 1<<i; } int Answer() { return ans; }
#include "Bruno.h" #include "bits/stdc++.h" using namespace std; int l, r, cnt1, cnt2, ans = 2e9; void InitB(int n, vector<int> p) { for (int i = l; i <= r; ++i) ans = min(ans, p[i]); for (int i = 0; i <= 9; ++i) SendB(bool(ans & (1<<i))); } void ReceiveB(bool x) { if (cnt1 == 9) { r |= 1<<cnt2; ++cnt2; } l |= 1<<cnt1; ++cnt1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...