/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void findCircle(int, int)':
foo.cpp:24:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < edges[x].size(); i++) {
                     ~~^~~~~~~~~~~~~~~~~
foo.cpp: In function 'void dfs_cir(int, int)':
foo.cpp:42:9: error: reference to 'hash' is ambiguous
     if (hash[x]) return;
         ^~~~
foo.cpp:18:21: note: candidates are: int hash [100005]
 int cir[MAXN], tot, hash[MAXN];
                     ^~~~
In file included from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/basic_string.h:5628:0,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/string:52,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/locale_classes.h:40,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/ios_base.h:41,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:42,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/istream:38,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/sstream:38,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/complex:45,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ccomplex:39,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/i686-w64-mingw32/bits/stdc++.h:52,
                 from foo.cpp:1:
C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cpp:44:5: error: reference to 'hash' is ambiguous
     hash[x] = tot;
     ^~~~
foo.cpp:18:21: note: candidates are: int hash [100005]
 int cir[MAXN], tot, hash[MAXN];
                     ^~~~
In file included from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/basic_string.h:5628:0,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/string:52,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/locale_classes.h:40,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/ios_base.h:41,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:42,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/istream:38,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/sstream:38,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/complex:45,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ccomplex:39,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/i686-w64-mingw32/bits/stdc++.h:52,
                 from foo.cpp:1:
C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cpp:46:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < edges[x].size(); i++) {
                     ~~^~~~~~~~~~~~~~~~~
foo.cpp:54:13: error: reference to 'hash' is ambiguous
         len[hash[x]][hash[e.to]] = len[hash[e.to]][hash[x]] = e.v;
             ^~~~
foo.cpp:18:21: note: candidates are: int hash [100005]
 int cir[MAXN], tot, hash[MAXN];
                     ^~~~
In file included from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/basic_string.h:5628:0,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/string:52,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/locale_classes.h:40,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/ios_base.h:41,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:42,
                 from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/istream:38,
                 from C:/MinGW32/lib/gcc/

信息

递交者
类型
递交
题目
P1807 迷失游乐园
语言
C++
递交时间
2017-01-21 23:39:39
评测时间
2017-01-21 23:39:56
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes