Submission #1261344

#TimeUsernameProblemLanguageResultExecution timeMemory
1261344robijoyTriple 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; } long long construct_range(int x, int y) { return {1,1,1}; } // 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)

triples.cpp: In function 'long long int construct_range(long long int, long long int)':
triples.cpp:28:18: error: cannot convert '<brace-enclosed initializer list>' to 'long long int' in return
   28 |     return {1,1,1};
      |                  ^