Submission #866923

#TimeUsernameProblemLanguageResultExecution timeMemory
866923maks007Detecting Molecules (IOI16_molecules)C++14
Compilation error
0 ms0 KiB
#include "molecules.h" #include "grader.cpp" #include "bits/stdc++.h" using namespace std; vector<int> find_subset(int L, int R, vector <int> a) { vector <int> ans; int sum = a[0], l = 0, r = 0, n = a.size(); while(1) { if(sum < L) { r ++; if(r == n) return ans; sum += a[r]; }else if(sum > R) { if(l == n) return ans; sum -= a[l]; l ++; }else break; } if(sum >= L && sum <= R) { for(int i = l; i <= r; i ++) ans.push_back(i); return ans; } return ans; }

Compilation message (stderr)

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