/ Vijos /

记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:8:21: warning: iteration 100001 invokes undefined behavior [-Waggressive-loop-optimizations]
    8 |                 b[i]=true;
      |                 ~~~~^~~~~
foo.cc:7:23: note: within this loop
    7 |         for(int i=0; i<=100001; i++)
      |                      ~^~~~~~~~
foo.cc:8:21: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset 100001 is out of the bounds [0, 100001] of object 'b' with type 'bool [100001]' [-Warray-bounds]
    8 |                 b[i]=true;
      |                 ~~~~^~~~~
foo.cc:4:6: note: 'b' declared here
    4 | bool b[100001];
      |      ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 464.0 KiB
#2 Accepted 4ms 540.0 KiB
#3 Accepted 4ms 540.0 KiB
#4 Accepted 4ms 540.0 KiB
#5 Accepted 4ms 540.0 KiB
#6 Accepted 4ms 540.0 KiB
#7 Accepted 4ms 540.0 KiB
#8 Accepted 4ms 540.0 KiB
#9 Accepted 5ms 488.0 KiB
#10 Accepted 4ms 540.0 KiB

信息

递交者
类型
递交
题目
P1911 珠心算测验
语言
C++
递交时间
2023-07-27 13:18:47
评测时间
2023-07-27 13:18:47
评测机
分数
100
总耗时
46ms
峰值内存
540.0 KiB