Submission #1261342

#TimeUsernameProblemLanguageResultExecution timeMemory
1261342robijoyTriple Peaks (IOI25_triples)C++20
Compilation error
0 ms0 KiB
/* * Starting with the name of almighty ALLAH */ #include <bits/stdc++.h> #include "triples.h" using namespace std; #define int long long long long count_triples(vector<int> H) { int N = H.size(),cnt = 0; 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> ro = {(j-i),(k-i),(k-j)}; vector<int> to = {H[i],H[j],H[k]}; sort(ro.begin(), ro.end()); sort(to.begin(), to.end()); if(ro == to) { cnt++; } } return cnt; } // int32_t main() { // int n; // cin>>n; // vector<int> arr(n); // for(auto &it:arr) cin>>it; // cout<<count_triples(arr)<<endl; // }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccrvNEF7.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