제출 #1250296

#제출 시각아이디문제언어결과실행 시간메모리
1250296alex0152Triple Peaks (IOI25_triples)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
const int nMax=2e5+5;

long long count_triples(std::vector<int> H)
{
    int n=H.size(),a[3],b[3];
    long long ans=0;
    for(int i=0; i<n-2; ++i)
        for(int j=i+1; j<n-1; ++j)
            for(int p=j+1; j<n; ++p)
            {
                a[0]=H[i],a[1]=H[j],a[2]=H[p];
                b[0]=j-i,b[1]=p-i,b[2]=p-j;
                sort(a,a+3);
                sort(b,b+3);
                if(a[0]==b[0] && a[1]==b[1] && a[2]==b[2])
                    ans++;
            }
    return ans;
}

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

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