제출 #309286

#제출 시각아이디문제언어결과실행 시간메모리
309286jainbot27곤돌라 (IOI14_gondola)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

#define f first
#define s second
#define pb push_back
#define ar array
#define all(x) x.begin(), x.end()
#define siz(x) (int)x.size()

#define FOR(x, y, z) for(int x = (y); x < (z); x++)
#define ROF(x, z, y) for(int x = (y-1); x >= (z); x--)
#define F0R(x, z) FOR(x, 0, z)
#define R0F(x, z) ROF(x, 0, z)
#define trav(x, y) for(auto&x:y)

using ll = long long;
using vi = vector<int>;
using vl = vector<long long>;
using pii = pair<int, int>;
using vpii = vector<pair<int, int>>;

template<class T> inline bool ckmin(T&a, T b) {return b < a ? a = b, 1 : 0;}
template<class T> inline bool ckmax(T&a, T b) {return b > a ? a = b, 1 : 0;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const char nl = '\n';
const int mxN = 2e5 + 10;
const int MOD = 1e9 + 7;
const long long infLL = 1e18;

int valid(int n, int* inputSeq){
    int copy[n];
    F0R(i, n){
        copy[i] = inputSeq[i]-1;
    }
    F0R(i, n-1){
        if(copy[i+1]==(copy[i]+1)%n)
            continue;
        return 0;
    }
    if((copy[n-1]+1)%n!=copy[0])
        return 0;
    return 1;
}

// int32_t main(){
//     ios_base::sync_with_stdio(0); cin.tie(0);


//     return 0;
// }

컴파일 시 표준 에러 (stderr) 메시지

/tmp/cchB1lFb.o: In function `main':
grader.cpp:(.text.startup+0xa2): undefined reference to `valid'
grader.cpp:(.text.startup+0xee): undefined reference to `countReplacement'
grader.cpp:(.text.startup+0x112): undefined reference to `replacement'
collect2: error: ld returned 1 exit status