/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void insect(int, int)':
foo.cpp:11:26: error: reference to 'next' is ambiguous
 void insect(int x,int y){next[cnt]=point[x];point[x]=cnt;v[cnt]=y;cnt++;}
                          ^
foo.cpp:5:19: note: candidates are: int next [200003]
 int point[100003],next[200003],v[200003],cnt=0,N,l[100003],r[100003],pre[100003],con[100003];
                   ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp: In function 'void dfs(int)':
foo.cpp:16:29: error: reference to 'next' is ambiguous
     for (i=point[x];i!=-1;i=next[i])
                             ^
foo.cpp:5:19: note: candidates are: int next [200003]
 int point[100003],next[200003],v[200003],cnt=0,N,l[100003],r[100003],pre[100003],con[100003];
                   ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp: In function 'void work(int)':
foo.cpp:30:15: warning: unused variable 's' [-Wunused-variable]
     long long s=0; int num=1000000008;
               ^
foo.cpp:30:24: warning: unused variable 'num' [-Wunused-variable]
     long long s=0; int num=1000000008;
                        ^
foo.cpp: In function 'int main()':
foo.cpp:105:12: error: reference to 'next' is ambiguous
     memset(next,-1,sizeof(next));
            ^
foo.cpp:5:19: note: candidates are: int next [200003]
 int point[100003],next[200003],v[200003],cnt=0,N,l[100003],r[100003],pre[100003],con[100003];
                   ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:105:27: error: reference to 'next' is ambiguous
     memset(next,-1,sizeof(next));
                           ^
foo.cpp:5:19: note: candidates are: int next [200003]
 int point[100003],next[200003],v[200003],cnt=0,N,l[100003],r[100003],pre[100003],con[100003];
                   ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:122:54: warning: unknown conversion type character 'l' in format [-Wformat=]
      printf("%d\n%lld\n",dp[l[1]][0][1],f[l[1]][0][1]);
                                                      ^
foo.cpp:122:54: warning: too many arguments for format [-Wformat-extra-args]
foo.cpp:125:57: warning: unknown conversion type character 'l' in format [-Wformat=]
       printf("%d\n%lld\n",1+dp[l[1]][1][0],f[l[1]][1][0]);
                                                         ^
foo.cp

信息

递交者
类型
递交
题目
P1770 大内密探
语言
C++
递交时间
2016-11-05 15:19:35
评测时间
2016-11-05 15:19:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes