Submission #1069541

#TimeUsernameProblemLanguageResultExecution timeMemory
1069541IgnutDetecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
// Ignut #include <bits/stdc++.h> using namespace std; using ll = long long; vector<int> solve(int L, int U, vector<int> w) { int n = w.size(); vector<pair<int, int>> v; for (int i = 0; i < n; i ++) v.push_back({w[i], i}); sort(v.begin(), v.end()); for (int l = 0; l < n; l ++) { ll sum = 0; for (int r = l; r < n; r ++) { sum += v[r].first; if (sum > U) break; if (sum < L) continue; vector<int> res; for (int i = l; i <= r; i ++) res.push_back(v[i].second); return res; } } return {}; }

Compilation message (stderr)

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