F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39662094_4084.cpp: In function 'void bfs()':
0_0_39662094_4084.cpp:24:35: error: reference to 'prev' is ambiguous
   24 |                         q.push(i);prev[i]=0;
      |                                   ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:66,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:60,
                 from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
0_0_39662094_4084.cpp:4:25: note:                 'int prev [205]'
    4 | int n,m,b[205],lnk[205],prev[205],edit[205],ans;
      |                         ^~~~
0_0_39662094_4084.cpp:32:61: error: reference to 'prev' is ambiguous
   32 |                                                 if(lnk[nxt])prev[lnk[nxt]]=now;
      |                                                             ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
0_0_39662094_4084.cpp:4:25: note:                 'int prev [205]'
    4 | int n,m,b[205],lnk[205],prev[205],edit[205],ans;
      |                         ^~~~
0_0_39662094_4084.cpp:38:69: error: reference to 'prev' is ambiguous
   38 |                                                                 fst=prev[fst];scd=rem;
      |                                                                     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
0_0_39662094_4084.cpp:4:25: note:                 'int prev [205]'
    4 | int n,m,b[205],lnk[205],prev[205],edit[205],ans;
      |                         ^~~~
0_0_39662094_4084.cpp: In function 'int main()':
0_0_39662094_4084.cpp:56:59: error: reference to 'prev' is ambiguous
   56 |                         mp[i].clear();b[i]=lnk[i]=edit[i]=prev[i]=0;
      |                                                           ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
0_0_39662094_4084.cpp:4:25: note:                 'int prev [205]'
    4 | int n,m,b[205],lnk[205],prev[205],edit[205],ans;
      |                         ^~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 03:23:47, Gzip enabled