/ Vijos /

记录详情

Compile Error

foo.cc: In function 'void work()':
foo.cc:81:29: error: invalid conversion from 'long long int*' to 'time_t*' {aka 'long int*'} [-fpermissive]
   81 |     long long q; srand(time(&q));
      |                             ^~
      |                             |
      |                             long long int*
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h:148,
                 from /usr/include/c++/9/ext/atomicity.h:35,
                 from /usr/include/c++/9/bits/ios_base.h:39,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/time.h:75:29: note:   initializing argument 1 of 'time_t time(time_t*)'
   75 | extern time_t time (time_t *__timer) __THROW;
      |                     ~~~~~~~~^~~~~~~
foo.cc: In function 'void init()':
foo.cc:72:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   72 |     for (int i=1;i<=n;i++) scanf("%d",&a[i].val), a[i].pos=i;
      |                            ~~~~~^~~~~~~~~~~~~~~~
foo.cc:73:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   73 |     for (int i=1;i<=n;i++) scanf("%d",&b[i]);
      |                            ~~~~~^~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1842 火柴排队
语言
C++
递交时间
2022-03-04 03:51:02
评测时间
2022-03-04 03:51:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes