/ Vijos /

记录详情

Runtime Error

foo.cc: In function 'int main()':
foo.cc:65:44: warning: iteration 1004 invokes undefined behavior [-Waggressive-loop-optimizations]
   65 |         for(int i = 1;i <= N;i ++) head[i] = -1;
      |                                    ~~~~~~~~^~~~
foo.cc:65:25: note: within this loop
   65 |         for(int i = 1;i <= N;i ++) head[i] = -1;
      |                       ~~^~~~
foo.cc:66:42: warning: iteration 1004 invokes undefined behavior [-Waggressive-loop-optimizations]
   66 |         for(int i = 1;i <= N;i ++) fa[i] = i;
      |                                    ~~~~~~^~~
foo.cc:66:25: note: within this loop
   66 |         for(int i = 1;i <= N;i ++) fa[i] = i;
      |                       ~~^~~~
foo.cc:65:44: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [4020, 4023] is out of the bounds [0, 4020] of object 'head' with type 'int [1005]' [-Warray-bounds]
   65 |         for(int i = 1;i <= N;i ++) head[i] = -1;
      |                                    ~~~~~~~~^~~~
foo.cc:15:13: note: 'head' declared here
   15 | int fa[N] , head[N] , cnt;
      |             ^~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Cancelled 0ms 0 Bytes
#2 Wrong Answer 1d0 < 1 4ms 412.0 KiB
#3 Wrong Answer Read 1, expect -1. 4ms 412.0 KiB
#4 Wrong Answer 1,22078d0 < 913 < 933 < 931 < 26ms 1.664 MiB
#5 Runtime Error Segmentation fault 32ms 1.496 MiB
#6 Runtime Error Segmentation fault 34ms 1.617 MiB
#7 Runtime Error Segmentation fault 31ms 1.496 MiB

信息

递交者
类型
递交
题目
P1053 Easy sssp
语言
C++
递交时间
2023-07-04 09:52:47
评测时间
2023-07-04 09:52:47
评测机
分数
0
总耗时
135ms
峰值内存
1.664 MiB