Submission #436709

#TimeUsernameProblemLanguageResultExecution timeMemory
436709shrimbFountain Parks (IOI21_parks)C++17
Compilation error
0 ms0 KiB
#include"bits/stdc++.h" // #include"grader.cpp" // #define int long long #define endl '\n' using namespace std; // void build(vector<int> u, vector<int> v, vector<int> a, vector<int> b); int construct_roads(std::vector<int> x, std::vector<int> y) { int n = x.size(); vector<pair<int,int>> v; for (int i = 0 ; i < n ; i++) v.emplace_back(y[i], i); sort(v.begin(), v.end()); for (int i = 1 ; i < n ; i++) { if (v[i].first != v[i-1].first + 2) return 0; } vector<int> u, vv, a, b; for (int i = 1 ; i < n ; i++) { u.push_back(v[i-1].second); vv.push_back(v[i].second); a.push_back(x[0] + 1); b.push_back(v[i-1].first + 1); } build(u, vv, a, b); return 1; }

Compilation message (stderr)

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:22:2: error: 'build' was not declared in this scope
   22 |  build(u, vv, a, b);
      |  ^~~~~