Submission #1250730

#TimeUsernameProblemLanguageResultExecution timeMemory
1250730JelalTkmTriple Peaks (IOI25_triples)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize ("O3") #pragma GCC target ("sse4") using namespace std; // #define int long long int // const int N = 5e5 + 10; // const int md = 1e9 + 7; // const int INF = 1e18; long long count_triples(vector<int> h) { int n = (int) h.size(); if (n <= 100) { 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++) { multiset<int> s; s.insert(j - i); s.insert(k - i); s.insert(k - j); multiset<int> s1; s1.insert(h[i]); s1.insert(h[j]); s1.insert(h[k]); if (s == s1) ans++; } } } return ans; } return 0ll; } // int32_t main(int32_t argc, char *argv[]) { // ios::sync_with_stdio(false); // cin.tie(nullptr); // int T = 1; // // cin >> T; // while (T--) { // vector<int> h = {4, 1, 4, 3, 2, 6, 1}; // cout << count_triples(h) << '\n'; // } // return 0; // }

Compilation message (stderr)

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