Submission #604918

#TimeUsernameProblemLanguageResultExecution timeMemory
604918evenvalueHighway Tolls (IOI18_highway)C++17
Compilation error
0 ms0 KiB
#include "highway.h" #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T> using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T> using min_heap = priority_queue<T, vector<T>, greater<T>>; template<typename T> using max_heap = priority_queue<T, vector<T>, less<T>>; using int64 = long long; using ld = long double; constexpr int kInf = 1e9 + 10; constexpr int64 kInf64 = 1e15 + 10; constexpr int kMod = 1e9 + 7; void find_pair(const int n, const vector<int> &U, const vector<int> &V, const int a, const int b) { const int m = U.size(); vector<int> W(m); const int64 init_score = ask(W); vector<int> deg(n); for (int i = 0; i < m; i++) { W[i] = 1; const int64 score = ask(W); if (score > init_score) { deg[U[i]]++; deg[V[i]]++; } W[i] = 1; } int s = -1, t = -1; for (int i = 0; i < n; i++) { if (deg[i] == 1) { (s == -1 ? s = i : t = i); } } answer(s, t); }

Compilation message (stderr)

/usr/bin/ld: /tmp/cctyh1hn.o: in function `main':
grader.cpp:(.text.startup+0x16c): undefined reference to `find_pair(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, int, int)'
collect2: error: ld returned 1 exit status