rings.cpp: In function 'void Init(int)':
rings.cpp:27:3: error: reference to 'prev' is ambiguous
prev[i] = 1;
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:28:10: error: reference to 'prev' is ambiguous
res += prev[i];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp: In function 'bool fn(int, int)':
rings.cpp:41:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < adj[u].size(); ++i) {
~~^~~~~~~~~~~~~~~
rings.cpp: In function 'bool check(int, int)':
rings.cpp:56:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < adj[u].size(); ++i) {
~~^~~~~~~~~~~~~~~
rings.cpp:60:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < adj[u].size(); ++i) {
~~^~~~~~~~~~~~~~~
rings.cpp: In function 'void Link(int, int)':
rings.cpp:83:9: error: reference to 'prev' is ambiguous
res -= prev[find(A)];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:87:10: error: reference to 'prev' is ambiguous
res -= prev[find(B)];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:110:3: error: reference to 'prev' is ambiguous
prev[find(A)] = 0;
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:112:4: error: reference to 'prev' is ambiguous
prev[find(A)]++;
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:114:10: error: reference to 'prev' is ambiguous
res += prev[find(A)];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:117:3: error: reference to 'prev' is ambiguous
prev[find(A)] = 0;
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:119:4: error: reference to 'prev' is ambiguous
prev[find(A)]++;
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:120:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0 ; j < adj[big[find(A)][3]].size(); j++) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rings.cpp:123:5: error: reference to 'prev' is ambiguous
prev[find(A)]++;
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:126:10: error: reference to 'prev' is ambiguous
res += prev[find(A)];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:131:3: error: reference to 'prev' is ambiguous
prev[find(A)] = sz[find(A)];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp:132:10: error: reference to 'prev' is ambiguous
res += prev[find(A)];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
rings.cpp: In function 'int CountCritical()':
rings.cpp:149:11: error: reference to 'prev' is ambiguous
return prev[last[i]];
^~~~
rings.cpp:12:130: note: candidates are: int prev [1000001]
int dsu[1000001],last[10], E[1000001], freq[1000001][5], sz[1000001], in[1000001], big[1000001][5], vis[1000001], type[1000001], prev[1000001], vsId, N;
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~