Problem globalwarming
User brat
Submission Time 2025-11-06 12:08:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

globalwarming.cpp: In function ‘int main()’:
globalwarming.cpp:33:37: error: no post-increment operator for type
33 | if((l==1)&&(r==1)) count++;
| ^~
globalwarming.cpp:35:42: error: no post-decrement operator for type
35 | else if((l==0)&&(r==0)) count--;
| ^~
globalwarming.cpp:38:30: error: no matching function for call to ‘max(long long int&, <unresolved overloaded function type>)’
38 | ans=max(ans,count);
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from globalwarming.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: candidate: ‘constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = long