제출 #448436

#제출 시각아이디문제언어결과실행 시간메모리
448436_DaNeK_Detecting Molecules (IOI16_molecules)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define pb push_back #define fi first #define se second #define bust ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); const int INF = INT_MAX; const int N = 2 * 1e5 + 10; const ld eps = 1e-6; const int mod = 1e9 + 7; /*int a[N];*/ int find_subset(int l, int u, int w[], int n, int result[]) { int s = l; ll cursum = 0; l = 0; int r = 0; sort (w, w + n); while (l < n) { while (r < n && cursum < s) { cursum += w[r]; ++r; } if (cursum >= s && cursum <= s) { for (int i = 0; i < r - l; ++i) result[i] = w[l + i]; return 1; } cursum -= w[l]; ++l; } return 0; } /* int main() { bust int t = 1; //cin >> t; //scanf ("%d", &t); while (t--) solve (); return 0; } */

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

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