답안 #1051272

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1051272 2024-08-10T02:57:32 Z vjudge1 Shopping (JOI21_shopping) C++17
컴파일 오류
0 ms 0 KB
#include "Bruno.h"
#include <vector>

namespace {

int N;
int variable_example[1000000];
int count;

bool FunctionExample(bool P) {
  return !P;
}

}  // namespace

void InitB(int N, std::vector<int> P) {
  ::N = N;
  for(int i = 0; i < N; i++) {
    variable_example[i] = P[i];
  }
  count = 0;
}
int stuf;
void ReceiveB(bool y) {
    stuf=stuf*2+y;
    if(++count==18){
        int curmn=1e9;
        for(int i=stuf;i<N;i++)
            if(variable_example[i]<curmn)
                curmn=variable_example[i],SendB(1);
            else SendB(0);
    }
}



    

Compilation message

Anna.cpp:10:6: warning: 'bool {anonymous}::FunctionExample(bool)' defined but not used [-Wunused-function]
   10 | bool FunctionExample(bool P) {
      |      ^~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cc2gCKOf.o: in function `main':
grader_anna.cpp:(.text.startup+0x8e): undefined reference to `InitA(int, int, int)'
/usr/bin/ld: grader_anna.cpp:(.text.startup+0xf1): undefined reference to `ReceiveA(bool)'
/usr/bin/ld: grader_anna.cpp:(.text.startup+0x177): undefined reference to `Answer()'
/usr/bin/ld: /tmp/cc6rJDNh.o: in function `ReceiveB(bool)':
Anna.cpp:(.text+0xb9): undefined reference to `SendB(bool)'
/usr/bin/ld: Anna.cpp:(.text+0xd6): undefined reference to `SendB(bool)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/ccC6qDYZ.o: in function `main':
grader_bruno.cpp:(.text.startup+0x194): undefined reference to `InitB(int, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: grader_bruno.cpp:(.text.startup+0x20f): undefined reference to `ReceiveB(bool)'
collect2: error: ld returned 1 exit status