/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void dfs(int, int)':
/in/foo.cc:16:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<a[rt].size();i++)
              ~^~~~~~~~~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:24:14: error: 'int time [300010]' redeclared as different kind of symbol
 int time[maxn],num[maxn];
              ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr.h:148,
                 from /usr/include/c++/6/ext/atomicity.h:35,
                 from /usr/include/c++/6/bits/ios_base.h:39,
                 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/time.h:192:15: note: previous declaration 'time_t time(time_t*)'
 extern time_t time (time_t *__timer) __THROW;
               ^~~~
/in/foo.cc: In function 'void solve(int, int)':
/in/foo.cc:39:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   if(deep[mx]-deep[x]==time[x])
                              ^
/in/foo.cc:39:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:45:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   if(sum-(deep[my]-deep[y])==time[y])
                                    ^
/in/foo.cc:45:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:51:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   if(deep[mx]-deep[x]==time[x])
                              ^
/in/foo.cc:51:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:54:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   if(sum-(deep[my]-deep[y])==time[y])
                                    ^
/in/foo.cc:54:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:58:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
  if(deep[mx]-deep[x]==time[x])
                             ^
/in/foo.cc:58:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc: In function 'int main()':
/in/foo.cc:73:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]
  scanf("%d",&time[i]);
                    ^
/in/foo.cc:73:21: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' [-Wformat=]
  scanf("%d",&time[i]);
                     ^
/in/foo.cc:82:36: warning: zero-length gnu_printf format string [-Wformat-zero-length]
  printf("%d",num[i]),i==n?printf(""):printf(" ");
                                    ^

信息

递交者
类型
递交
题目
P2004 天天爱跑步
语言
C++
递交时间
2017-04-29 20:38:57
评测时间
2017-04-29 20:38:57
评测机
分数
0
总耗时
296ms
峰值内存
35.641 MiB