Submission #775048

#TimeUsernameProblemLanguageResultExecution timeMemory
775048cheat_when_I_was_youngShopping (JOI21_shopping)C++17
Compilation error
0 ms0 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; }

Compilation message (stderr)

Anna.cpp: In function 'void InitA(int, int, int)':
Anna.cpp:6:33: error: 'sendA' was not declared in this scope; did you mean 'SendA'?
    6 |     for (int i = 0; i < 9; ++i) sendA(bool(l & (1<<i)));
      |                                 ^~~~~
      |                                 SendA
Anna.cpp:7:33: error: 'sendA' was not declared in this scope; did you mean 'SendA'?
    7 |     for (int i = 0; i < 9; ++i) sendA(bool(r & (1<<i)));
      |                                 ^~~~~
      |                                 SendA

Bruno.cpp: In function 'void InitB(int, std::vector<int>)':
Bruno.cpp:7:34: error: 'sendB' was not declared in this scope; did you mean 'SendB'?
    7 |     for (int i = 0; i <= 9; ++i) sendB(bool(ans & (1<<i)));
      |                                  ^~~~~
      |                                  SendB