Submission #297755

#TimeUsernameProblemLanguageResultExecution timeMemory
297755emnikDetecting Molecules (IOI16_molecules)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "molecules.h" using namespace std; #define pb push_back #define all(x) begin(x), end(x) #define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int find_subsets(int l, int r, int w[], int n, int result[]){ vector<int> a, b; for(int i=1; i <= n; i++){ int sum=w[i], flag=0; a.clear(); a.pb(i); for(int j=i+1; j <= n; j++){ if(sum >= l && sum <= r){ flag=1; break; } sum+= w[j]; a.pb(j); } if(flag) b = a; } for(int i=0; i < (int)b.size(); i++){ result[i+1]=b[i]; } return (int)b.size(); }

Compilation message (stderr)

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