Submission #1249782

#TimeUsernameProblemLanguageResultExecution timeMemory
1249782kduckpTriple Peaks (IOI25_triples)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long long count_triples(vector<int> H) { long long res = 0; int n = H.size(); for (int i = 0; i < n; i++) for (int j = i + 1; j < n; j++) for (int k = j + 1; k < n; k++) { vector<int> height = {H[i], H[j], H[k]}; vector<int> dist = {j - i, k - i, k - j}; sort(height.begin(), height.end()); sort(dist.begin(), dist.end()); if (height == dist) res++; } return res; }

Compilation message (stderr)

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