gw.cpp: In function 'int main()':
gw.cpp:18:22: error: reference to 'prev' is ambiguous
18 | if ((*it).first!=prev){
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/algorithm:61,
from gw.cpp:2:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:224:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)'
224 | prev(_BidirectionalIterator __x, typename
| ^~~~
gw.cpp:8:29: note: 'int prev'
8 | int n,t,islands,max_islands,prev=1;
| ^~~~
gw.cpp:19:9: error: reference to 'prev' is ambiguous
19 | prev=(*it).first;
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/algorithm:61,
from gw.cpp:2:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:224:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)'
224 | prev(_BidirectionalIterator __x, typename
| ^~~~
gw.cpp:8:29: note: 'int prev'
8 | int n,t,islands,max_islands,prev=1;
| ^~~~
gw.cpp:11:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
gw.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | scanf("%d",&t);
| ~~~~~^~~~~~~~~