답안 #775048

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
775048 2023-07-06T07:10:59 Z cheat_when_I_was_young Shopping (JOI21_shopping) C++17
컴파일 오류
0 ms 0 KB
#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

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