Submission #676664

# Submission time Handle Problem Language Result Execution time Memory
676664 2022-12-31T15:59:58 Z DwightKSchrute Stray Cat (JOI20_stray) C++17
Compilation error
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