记录详情

Runtime Error

foo.c: In function 'main':
foo.c:29:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        if(read[0]==2) s[i]=4;break;
        ^~
foo.c:29:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
        if(read[0]==2) s[i]=4;break;
                              ^~~~~
foo.c:32:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        if(read[0]==2) s[i]=5;break;
        ^~
foo.c:32:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
        if(read[0]==2) s[i]=5;break;
                              ^~~~~
foo.c:35:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        if(read[0]==2) s[i]=2;break;
        ^~
foo.c:35:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
        if(read[0]==2) s[i]=2;break;
                              ^~~~~
foo.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&N,&M);
  ^~~~~~~~~~~~~~~~~~~
foo.c:15:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&read[i]);
     ^~~~~~~~~~~~~~~~~~~~
foo.c:23:7: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
       scanf("%d",&read[i]);
       ^~~~~~~~~~~~~~~~~~~~
foo.c:7:7: warning: 's' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int* s;
       ^
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 0ms 256.0 KiB
#2 Runtime Error Segmentation fault 0ms 284.0 KiB
#3 Runtime Error Segmentation fault 1ms 300.0 KiB
#4 Runtime Error Segmentation fault 1ms 300.0 KiB
#5 Runtime Error Segmentation fault 1ms 384.0 KiB
#6 Runtime Error Segmentation fault 1ms 384.0 KiB
#7 Runtime Error Segmentation fault 1ms 304.0 KiB
#8 Runtime Error Segmentation fault 1ms 296.0 KiB
#9 Runtime Error Segmentation fault 1ms 304.0 KiB
#10 Runtime Error Segmentation fault 1ms 384.0 KiB

信息

递交者
类型
递交
题目
P1004 小m的刷子
语言
C
递交时间
2021-01-30 18:07:48
评测时间
2021-01-30 18:07:48
评测机
分数
0
总耗时
10ms
峰值内存
384.0 KiB