제출 #1250910

#제출 시각아이디문제언어결과실행 시간메모리
1250910somefolk3개의 봉우리 (IOI25_triples)C++20
컴파일 에러
0 ms0 KiB
#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <unordered_set>
#include <complex>
#include <list>
#include <cassert>
#include <chrono>
#include <random>
#include <stack>
#include <iomanip>
#include <fstream>
using namespace std;

#define endl "\n"
#define int long long

const int INF = 1e9+7;
const int MOD = 1e9+7;

bool check(int d1, int d2, int d3, int h1, int h2, int h3){
    return (((d1 == h1 && d2 == h2 && d3 == h3) ||
        (d1 == h1 && d2 == h3 && d3 == h2) ||
        (d1 == h2 && d2 == h1 && d3 == h3) ||
        (d1 == h2 && d2 == h3 && d3 == h1) ||
        (d1 == h3 && d2 == h1 && d3 == h2) ||
        (d1 == h3 && d2 == h2 && d3 == h1)));
}

int count_triples(vector<int> a){
    int n = (int)a.size();
    int cnt = 0;
    for(int i = 0; i < n; i++){
        for(int j = i; j < n; j++){
            for(int k = j; k < n; k++){
                cnt += check(j-i, k-j, k-i, a[i], a[j], a[k]);
            }
        }
    }
    return cnt;
}

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

/usr/bin/ld: /tmp/ccZnoXCm.o: in function `main':
grader.cpp:(.text.startup+0x18a): undefined reference to `construct_range(int, int)'
/usr/bin/ld: grader.cpp:(.text.startup+0x37b): undefined reference to `count_triples(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status