Submission #1319728

#TimeUsernameProblemLanguageResultExecution timeMemory
1319728thuhienneHappiness (Balkan15_HAPPINESS)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "happiness.h" using namespace std; using ll = long long; #define thuhien "" #define re exit(0); multiset <int> coins; bool check(multiset <int> & a) { ll s = 1; for (int x : a) { if (x > s) return 0; s += x; } return 1; } bool init(int cnt,ll maxsize,vector <ll> tmp) { for (int x : tmp) coins.insert(x); return check(coins); } bool is_happy(int type,int cnt,vector <ll> tmp) { for (int x : tmp) { if (type == -1) coins.erase(coins.find(x)); else coins.insert(x); } return check(coins); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccdKKXzJ.o: in function `main':
grader.cpp:(.text.startup+0x9a): undefined reference to `init(int, long long, long long*)'
/usr/bin/ld: grader.cpp:(.text.startup+0x15b): undefined reference to `is_happy(int, int, long long*)'
collect2: error: ld returned 1 exit status