Submission #504073

#TimeUsernameProblemLanguageResultExecution timeMemory
504073Newtech66Detecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; int find_subset(int l,int u,int w[],int n,int result[]) { for(int i=0;i<n;i++) { if(l<=w[i] && w[i]<=u) { result[0]=i; return 1; } } for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if(l<=w[i]+w[j] && w[i]+w[j]<=u) { result[0]=i; result[1]=j; return 2; } } } return 0; }

Compilation message (stderr)

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