/ Vijos /

记录详情

Compile Error

/in/foo.cc:10:8: error: 'int exit' redeclared as different kind of symbol
 int an,exit;
        ^~~~
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/ext/string_conversions.h:41,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/stdlib.h:504:13: note: previous declaration 'void exit(int)'
 extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
             ^~~~
/in/foo.cc: In function 'int com()':
/in/foo.cc:29:12: error: assignment of function 'void exit(int)'
  an=1,exit=1;
            ^
/in/foo.cc:29:12: error: cannot convert 'int' to 'void(int) throw ()' in assignment
/in/foo.cc:43:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:64:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=1;i<=n;i++) cout<<ans[i]<<" "; cout<<endl;
  ^~~
/in/foo.cc:64:43: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  for(int i=1;i<=n;i++) cout<<ans[i]<<" "; cout<<endl;
                                           ^~~~
/in/foo.cc: In function 'int dfs2(int, int)':
/in/foo.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/in/foo.cc: In function 'int dfs(int, int)':
/in/foo.cc:57:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1179 邮票面值设计
语言
C++
递交时间
2017-04-22 22:11:10
评测时间
2017-04-22 22:11:10
评测机
分数
0
总耗时
543ms
峰值内存
29.727 MiB