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_17780489_4464.cpp: In function 'int main()':
0_0_17780489_4464.cpp:30:16: error: reference to 'prev' is ambiguous
         memset(prev,0,sizeof(prev));
                ^
0_0_17780489_4464.cpp:10:44: note: candidates are: int prev [5005][5005]
 int a[5005],g[5005][5005],Next[5005][5005],prev[5005][5005],f[5005][5005];
                                            ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_17780489_4464.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
0_0_17780489_4464.cpp:30:30: error: reference to 'prev' is ambiguous
         memset(prev,0,sizeof(prev));
                              ^
0_0_17780489_4464.cpp:10:44: note: candidates are: int prev [5005][5005]
 int a[5005],g[5005][5005],Next[5005][5005],prev[5005][5005],f[5005][5005];
                                            ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_17780489_4464.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
0_0_17780489_4464.cpp:38:17: error: reference to 'prev' is ambiguous
                 prev[i][a[j]] = max(prev[i][a[j]],j);
                 ^
0_0_17780489_4464.cpp:10:44: note: candidates are: int prev [5005][5005]
 int a[5005],g[5005][5005],Next[5005][5005],prev[5005][5005],f[5005][5005];
                                            ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_17780489_4464.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
0_0_17780489_4464.cpp:38:37: error: reference to 'prev' is ambiguous
                 prev[i][a[j]] = max(prev[i][a[j]],j);
                                     ^
0_0_17780489_4464.cpp:10:44: note: candidates are: int prev [5005][5005]
 int a[5005],g[5005][5005],Next[5005][5005],prev[5005][5005],f[5005][5005];
                                            ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_17780489_4464.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
0_0_17780489_4464.cpp:48:53: error: reference to 'prev' is ambiguous
                     int tmp1 = f[Next[i][a[j - 1]]][prev[j - 1][a[j - 1]]],tmp2= g[Next[i][a[j - 1]]][prev[j - 1][a[j - 1]]];
                                                     ^
0_0_17780489_4464.cpp:10:44: note: candidates are: int prev [5005][5005]
 int a[5005],g[5005][5005],Next[5005][5005],prev[5005][5005],f[5005][5005];
                                            ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_17780489_4464.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
0_0_17780489_4464.cpp:49:54: error: 'tmp2' was not declared in this scope
                     if (tmp1 == res1) res2 =((res2 - tmp2) % Mod + Mod) % Mod;
                                                      ^
0_0_17780489_4464.cpp:50:56: error: 'tmp2' was not declared in this scope
                     tmp1 = f[Next[i][a[j - 1]]][j - 1],tmp2 = g[Next[i][a[j - 1]]][j - 1];
                                                        ^
0_0_17780489_4464.cpp:60:38: error: reference to 'prev' is ambiguous
             int tmp1 = f[Next[0][i]][prev[n + 1][i]],tmp2= g[Next[0][i]][prev[n + 1][i]];
                                      ^
0_0_17780489_4464.cpp:10:44: note: candidates are: int prev [5005][5005]
 int a[5005],g[5005][5005],Next[5005][5005],prev[5005][5005],f[5005][5005];
                                            ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_17780489_4464.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
0_0_17780489_4464.cpp:61:49: error: 'tmp2' was not declared in this scope
             if (tmp1 > ans1) ans1 = tmp1,ans2 = tmp2;
                                                 ^
0_0_17780489_4464.cpp:62:50: error: 'tmp2' was not declared in this scope
             else if (tmp1 == ans1) ans2= (ans2 + tmp2) % Mod;
                                                  ^


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-25 10:21:19, Gzip enabled