记录详情

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:8: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:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&read[i]);
     ^~~~~~~~~~~~~~~~~~~~
foo.c:9:7: warning: 's' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int* s;
       ^
foo.c:48:5: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized]
    m++;
    ~^~
foo.c:46:5: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
    n++;
    ~^~
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 0ms 288.0 KiB
#2 Runtime Error Segmentation fault 0ms 256.0 KiB
#3 Runtime Error Segmentation fault 1ms 428.0 KiB
#4 Runtime Error Segmentation fault 1ms 384.0 KiB
#5 Runtime Error Segmentation fault 1ms 300.0 KiB
#6 Runtime Error Segmentation fault 1ms 300.0 KiB
#7 Runtime Error Segmentation fault 1ms 304.0 KiB
#8 Runtime Error Segmentation fault 1ms 384.0 KiB
#9 Runtime Error Segmentation fault 1ms 292.0 KiB
#10 Runtime Error Segmentation fault 1ms 384.0 KiB

信息

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