Submission #996745

#TimeUsernameProblemLanguageResultExecution timeMemory
996745stdfloatDetecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" #include "molecules.h" #include "grader.cpp" using namespace std; using ll = long long; vector<int> find_subset(int L, int R, vector<int> w) { int n = (int)w.size(); pair<int, int> p[n]; for (int i = 0; i < n; i++) p[i] = {w[i], i}; sort(p, p + n); ll sm = 0; int l = 0; for (int i = 0; i < n; i++) { sm += p[i].first; while (sm > R) sm -= p[l++].first; if (L <= sm) { vector<int> v; while (l <= i) v.push_back(p[l++].second); return v; } } return {}; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc89IVYf.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccTSkZYe.o:molecules.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status