Problem | acorns |
---|---|
User | PlayVoltz |
Submission Time | 2023-12-26 01:20:47 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
acorns.cpp: In function ‘void insert(long long int, long long int)’:
acorns.cpp:22:62: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
22 | if (f(cht[s-1], line)<=f(cht[s-2], line))cht.pop_back(), ++ans;
| ^~~
| abs
At global scope:
cc1plus: error: ‘::main’ must return ‘int’
acorns.cpp: In function ‘int main()’:
acorns.cpp:39:18: error: cannot convert ‘std::pair<long long int, long long int>’ to ‘long long int’
39 | insert(mp(a[i].first, -a[i].first*a[i].second));
| ^
| |
| std::pair<long long int, long long int>
acorns.cpp:18:17: note: initializing argument 1 of ‘void insert(long long int, long long int)’
18 | void insert(int m, int c){
| ^