Compile Error

/in/foo.cc:4:27: error: 'long long int time' redeclared as different kind of entity
    4 | int n,d[200005],t[200005],time;
      |                           ^~~~
In file included from /usr/include/c++/12/ctime:42,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:49,
                 from /in/foo.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:14:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   14 |                 time+=t[i];
      |                 ~~~~^~~~~~
/in/foo.cc:14:21: error: assignment of read-only location 'time'
/in/foo.cc:15:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |                 if(time>d[i])
      |                    ~~~~^~~~~

信息

递交者
类型
递交
题目
P2916 任务调度
语言
C++
递交时间
2025-06-08 08:58:26
评测时间
2025-06-08 08:58:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes