/ Vijos /

记录详情

Accepted

foo.cc: In function 'void init(int*)':
foo.cc:8:27: warning: 'sizeof' on array function parameter 'a' will return size of 'int*' [-Wsizeof-array-argument]
    8 |         memset(a,0,sizeof(a));
      |                          ~^~
foo.cc:5:15: note: declared here
    5 | void init(int a[]) {
      |           ~~~~^~~
foo.cc:8:20: warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
    8 |         memset(a,0,sizeof(a));
      |                    ^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 284.0 KiB
#2 Accepted 3ms 284.0 KiB
#3 Accepted 1ms 284.0 KiB
#4 Accepted 3ms 284.0 KiB

信息

递交者
类型
递交
题目
P1304 回文数
语言
C++
递交时间
2023-05-09 20:31:10
评测时间
2023-05-09 20:33:30
评测机
分数
100
总耗时
11ms
峰值内存
284.0 KiB