Submission #638025

#TimeUsernameProblemLanguageResultExecution timeMemory
638025morasha3Detecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "molecules.h" #include "grader.cpp" typedef int ll; using namespace std; vector<int> find_subset(int l, int u, vector<int> arr) { vector<ll>ans; ll sum=arr[0],l1=1,s=-1,n=arr.size(); sort(arr.begin(),arr.end()); for(int i=0;i<n;i++) { if(i!=0) { sum-=arr[i-1]; } if(sum>=l&&sum<=u) { s=i; break; } while(l1<n&&sum<l) { sum+=arr[l1]; l1++; } if(sum>=l&&sum<=u) { s=i; break; } } if(s==-1)return ans; else { for(int i=s;i<l1;i++) { if(i==n)break; ans.push_back(i); } return ans; } }

Compilation message (stderr)

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