답안 #953527

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
953527 2024-03-26T05:31:10 Z irmuun 곤돌라 (IOI14_gondola) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

int valid(int n, int in[]){
    int mn=n+1,pos=-1;;
    for(int i=0;i<n;i++){
        if(in[i]<=n){
            mn=min(mn,in[i]);
            pos=i;
        }
    }
    if(pos==-1) return 1;
    for(int i=0;i<n;i++){
        int p=(pos+i)%n;
        if(in[p]<=n&&in[p]!=mn+i) return 0;
    }
    return 1;
}
int replacement(int n, int gon[], int rep[]){
    return 0;
}
int countReplacement(int n, int in[]){
    return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccdl1GHa.o: in function `main':
grader.cpp:(.text.startup+0xb6): undefined reference to `valid'
/usr/bin/ld: grader.cpp:(.text.startup+0x108): undefined reference to `countReplacement'
/usr/bin/ld: grader.cpp:(.text.startup+0x132): undefined reference to `replacement'
collect2: error: ld returned 1 exit status