记录详情

Accepted

/in/foo.c: In function 'main':
/in/foo.c:9:14: warning: iteration 8 invokes undefined behavior [-Waggressive-loop-optimizations]
         s=s+a[i]*(i+1);
             ~^~~
/in/foo.c:8:5: note: within this loop
     for(i=0;i<9;i++)
     ^~~
/in/foo.c:16:13: warning: array subscript is above array bounds [-Warray-bounds]
             printf("%d-%d%d%d-%d%d%d%d%d-X",a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:23:13: warning: array subscript is above array bounds [-Warray-bounds]
             printf("%d-%d%d%d-%d%d%d%d%d-%d",a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],j);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 状态 耗时 内存占用
#1 Accepted 0ms 212.0 KiB
#2 Accepted 1ms 220.0 KiB
#3 Accepted 0ms 220.0 KiB
#4 Accepted 0ms 212.0 KiB
#5 Accepted 0ms 128.0 KiB
#6 Accepted 0ms 212.0 KiB
#7 Accepted 0ms 220.0 KiB
#8 Accepted 0ms 212.0 KiB
#9 Accepted 0ms 128.0 KiB
#10 Accepted 0ms 212.0 KiB

信息

递交者
类型
递交
题目
P1132 ISBN号码
比赛
南京师范大学算法竞赛之2020年寒假战“疫”系列赛Round3 总第73期赛
语言
C
递交时间
2020-02-23 13:57:18
评测时间
2020-02-23 13:57:18
评测机
分数
100
总耗时
8ms
峰值内存
220.0 KiB