제출 #1361483

#제출 시각아이디문제언어결과실행 시간메모리
1361483jalol2503개의 봉우리 (IOI25_triples)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

long long count_triples(vector<int> H){
    int n = H.size();
    long long ans = 0;

    for(int i = 0; i < n; i++){
        for(int j = i + 1; j < n; j++){
            for(int k = j + 1; k < n; k++){
                int a = H[i], b = H[j], c = H[k];
                int x = j - i, y = k - j, z = k - i;

                if( (a==x && b==y && c==z) ||
                    (a==x && b==z && c==y) ||
                    (a==y && b==x && c==z) ||
                    (a==y && b==z && c==x) ||
                    (a==z && b==x && c==y) ||
                    (a==z && b==y && c==x) ){
                    ans++;
                }
            }
        }
    }
    return ans;
}

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

/usr/bin/ld: /tmp/ccS2WToP.o: in function `main':
grader.cpp:(.text.startup+0x197): undefined reference to `construct_range(int, int)'
collect2: error: ld returned 1 exit status