/ Vijos /

记录详情

Compile Error

foo.cc: In function 'bool bfs()':
foo.cc:44:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 for( register int i = 0 ; i < linker[ now ].size() ; i++ )
                           ~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'long long int dinic(int, long long int)':
foo.cc:54:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 for( register int i = cur[ now ] ; i < linker[ now ].size() ; i++ )
                                    ~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'bool check(long long int)':
foo.cc:77:14: error: reference to 'hash' is ambiguous
 addedge( s , hash[i][j] , x - a[i][j] ) , tot += x - a[i][j];
              ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:78:23: error: reference to 'hash' is ambiguous
 if( i != 1 ) addedge( hash[i][j] , hash[i - 1][j] , inf );
                       ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:78:36: error: reference to 'hash' is ambiguous
 if( i != 1 ) addedge( hash[i][j] , hash[i - 1][j] , inf );
                                    ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:79:23: error: reference to 'hash' is ambiguous
 if( i != n ) addedge( hash[i][j] , hash[i + 1][j] , inf );
                       ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:79:36: error: reference to 'hash' is ambiguous
 if( i != n ) addedge( hash[i][j] , hash[i + 1][j] , inf );
                                    ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:80:23: error: reference to 'hash' is ambiguous
 if( j != 1 ) addedge( hash[i][j] , hash[i][j - 1] , inf );
                       ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:80:36: error: reference to 'hash' is ambiguous
 if( j != 1 ) addedge( hash[i][j] , hash[i][j - 1] , inf );
                                    ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:81:23: error: reference to 'hash' is ambiguous
 if( j != m ) addedge( hash[i][j] , hash[i][j + 1] , inf );
                       ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:81:36: error: reference to 'hash' is ambiguous
 if( j != m ) addedge( hash[i][j] , hash[i][j + 1] , inf );
                                    ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:83:15: error: reference to 'hash' is ambiguous
 else addedge( hash[i][j] , t , x - a[i][j] );
               ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:84:28: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 while( bfs() ) while( temp = dinic( s , inf ) ) ans += temp;
                       ~~~~~^~~~~~~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:100:1: error: reference to 'hash' is ambiguous
 hash[i][j] = ++num;
 ^~~~
foo.cc:23:33: note: candidates are: int hash [42][42]
 int n , m , a[40 + 2][40 + 2] , hash[40 + 2][40 + 2] , r;
                                 ^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cc:90:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 scanf( "%d" , &r );
 ~~~~~^~~~~~~~~~~~~
foo.cc:93:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 scanf( "%d %d" , &n , &m );
 ~~~~~^~~~~~~~~~~~~~~~~~~~~
foo.cc:96:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 scanf( "%d" , &a[i][j] );
 ~~~~~^~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
P1940 奇怪的游戏
语言
C++
递交时间
2021-05-22 20:13:23
评测时间
2021-05-22 20:13:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes