/ Vijos /

记录详情

Compile Error

/in/foo.cc:7:68: error: 'long long int time [1000000]' redeclared as different kind of symbol
 long long ans,m,n,x,y,h,geshu[1000000],guojia[1000000],time[1000000];
                                                                    ^
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:8:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:15:19: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             time[h]=x;
                   ^
/in/foo.cc:15:21: error: assignment of read-only location '*(time + ((sizetype)h))'
             time[h]=x;
                     ^
/in/foo.cc:15:21: error: cannot convert 'long long int' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment

信息

递交者
类型
递交
题目
P2011 海港
语言
C++
递交时间
2020-08-09 16:31:36
评测时间
2020-08-09 16:31:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes