Problem makingparallelograms
User Memeathon
Submission Time 2025-02-09 20:23:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

makingparallelograms.cpp: In function ‘int main()’:
makingparallelograms.cpp:20:4: error: reference to ‘pair’ is ambiguous
20 | pair++;
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from makingparallelograms.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:208:12: note: candidates are: ‘template<class _T1, class _T2> struct std::pair’
208 | struct pair
| ^~~~
makingparallelograms.cpp:7:24: note: ‘long long int pair’
7 | ll n, l[maxn], ptr=-1, pair=0, ans=0;
| ^~~~
makingparallelograms.cpp:22:7: error: reference to ‘pair’ is ambiguous
22 | if (pair==2) {
| ^~~~
In file in