/in/foo.cc: In function 'void insert(int, int)':
/in/foo.cc:22:63: error: reference to 'prev' is ambiguous
inline void insert(int u,int v) { e[++top].to=v;e[top].next=prev[u];prev[u]=&e[top]; }
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc: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
^~~~
/in/foo.cc:22:71: error: reference to 'prev' is ambiguous
inline void insert(int u,int v) { e[++top].to=v;e[top].next=prev[u];prev[u]=&e[top]; }
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc: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
^~~~
/in/foo.cc: In function 'void solve_3()':
/in/foo.cc:30:27: error: reference to 'prev' is ambiguous
for (register edge *i=prev[x];i;i=i->next) for (register edge *j=prev[i->to];j;j=j->next)
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc: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
^~~~
/in/foo.cc:30:72: error: reference to 'prev' is ambiguous
for (register edge *i=prev[x];i;i=i->next) for (register edge *j=prev[i->to];j;j=j->next)
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc: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
^~~~
/in/foo.cc: In function 'void solve_4()':
/in/foo.cc:36:31: error: reference to 'prev' is ambiguous
for (register edge *I=prev[i];I;I=I->next)
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc: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
^~~~
/in/foo.cc:38:39: error: reference to 'prev' is ambiguous
for (register edge *J=prev[j];J;J=J->next)
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc: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
^~~~
/in/foo.cc: In function 'void solve_5()':
/in/foo.cc:45:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (int k=1;k<=n;++k) cnt[k]=0;sum=0;
^~~
/in/foo.cc:45:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for (int k=1;k<=n;++k) cnt[k]=0;sum=0;
^~~
/in/foo.cc:46:31: error: reference to 'prev' is ambiguous
for (register edge *I=prev[i];I;I=I->next) if (I->to!=j&&a[I->to][j]) ++cnt[I->to],++sum;
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc: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
^~~~
/in/foo.cc:47:31: error: reference to 'prev' is ambiguous
for (register edge *I=prev[i];I;I=I->next)
^~~~
/in/foo.cc:21:47: note: candidates are: edge* prev [1010]
struct edge { int to; edge *next; }e[MAXM],*prev[MAXN];
^~~~
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/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:220:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator,