Problem duckbuttons
User WJR
Submission Time 2026-02-17 22:06:52
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckbuttons.cpp:4:43: error: ‘long long int remove’ redeclared as different kind of entity
4 | int l[200010],r[200010],x[200010],sum,cnt,remove;
| ^~~~~~
In file included from /usr/include/c++/9/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
from duckbuttons.cpp:1:
/usr/include/stdio.h:146:12: note: previous declaration ‘int remove(const char*)’
146 | extern int remove (const char *__filename) __THROW;
| ^~~~~~
duckbuttons.cpp: In function ‘int main()’:
duckbuttons.cpp:24:34: error: overloaded function with no contextual type information
24 | remove += it -> first * it -> second;
| ^~~~~~
duckbuttons.cpp:27:13: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator-’
27 | sum = sum - remove + (cnt * x