Submission #781760

#TimeUsernameProblemLanguageResultExecution timeMemory
781760acatmeowmeowDetecting Molecules (IOI16_molecules)C++11
Compilation error
0 ms0 KiB
#include "molecules.h" #include <bits/stdc++.h> using namespace std; #define int long long vector<int> find_subset(int l, int u, vector<int> w) { ios::sync_with_stdio(false); cin.tie(nullptr); int n = w.size(); sort(w.begin(), w.end()); for (int i = 0, j = 0, sum = 0; i < n; i++) { sum += w[i]; while (sum > u && j < i) sum -= w[j++]; if (l <= sum && sum <= u) { vector<int> ans; for (int k = j; k <= i; k++) ans.push_back(w[k]); return ans; } } return vector<int>(0); }

Compilation message (stderr)

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