제출 #919640

#제출 시각아이디문제언어결과실행 시간메모리
919640NurislamDetecting Molecules (IOI16_molecules)C++14
컴파일 에러
0 ms0 KiB
#include "molecules.h" #include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back vector<int> find_subset(int l, int r, vector<int> temp) { vector<int> ans; int n=temp.size(); vector<pair<int, int>> w; for (int i = 0; i < n; ++i) { w.push_back({temp[i], i}); } sort(w.begin(), w.end()); int i = 0, j = 0, sum = 0; while(j < n){ sum+=w[j++].first; while(sum > r){ sum -= w[i++].first; } if(sum > l){ for(; i <= j; i++){ ans.pb(w[i].second); }return ans; } } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccXsfxix.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