답안 #676664

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
676664 2022-12-31T15:59:58 Z DwightKSchrute 길고양이 (JOI20_stray) C++17
컴파일 오류
0 ms 0 KB
#include "Catherine.h"
#include <bits/stdc++.h>
using namespace std;
typedef vector<int>vi;
typedef vector<vi>vvi;

#define all(x) x.begin(),x.end()

//I can retrieve information between moves

namespace {
    int A, B;
    bool reached_leaf=0;

};

void Init(int _A, int _B) {
    A=_A,B=_B;
}



int Move(vi y) {
    if(accumulate(all(y),0)==1){
        reached_leaf=1;
        return -1;
    }
    for(int i=0; i<y.size(); i++)
        if(y[i]==1)
            return i;
    return -1;
}



    

Compilation message

Anthony.cpp: In function 'int Move(vi)':
Anthony.cpp:28:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   28 |     for(int i=0; i<y.size(); i++)
      |                  ~^~~~~~~~~
/usr/bin/ld: /tmp/ccQREoE0.o: in function `main':
grader_anthony.cpp:(.text.startup+0x191): undefined reference to `Mark(int, int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/ccg1YJ2J.o: in function `main':
grader_catherine.cpp:(.text.startup+0x41c): undefined reference to `Init(int, int)'
/usr/bin/ld: grader_catherine.cpp:(.text.startup+0xcfa): undefined reference to `Move(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status