답안 #947428

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
947428 2024-03-16T07:07:57 Z phoenix0423 길고양이 (JOI20_stray) C++17
컴파일 오류
0 ms 0 KB
#include "Catherine.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;

int A, B, lst = -1, move = 0, ok = 0;
string ps = "";

void Init(int a, int b){
    A = a, B = b;
}

int Move(vector<int> y){
    // cout<<"ck : "<<A<<" "<<B<<"\n";
    if(lst != -1) y[lst]++;
    int deg = accumulate(y.begin(), y.end(), 0);
    if(deg == 1){
        return max_element(y.begin(), y.end()) - y.begin();
    }
    if(true){
        for(int i = 0; i < A; i++){
            // cout<<"try : "<<y[i]<<" "<<y[(i + 1) % A]<<"\n";
            if(y[i] == 1 && y[(i + 1) % A]){
                return i;
            }
        }
    }
    return 0;
    if(deg > 2){
        if(lst) return lst ^ 1;
        else return y[0] != 1;
    }
    if(ok){

    }
}
/*
7 6 3 6 1
0 2
0 4
1 2
1 3
1 5
4 6
*/



    

Compilation message

/usr/bin/ld: /tmp/ccHq0MMn.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/ccvm19J9.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