记录详情

Runtime Error

foo.cc: In function 'int main()':
foo.cc:11:22: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
   11 |         for(int j=1;j<=n;j++)
      |                     ~^~~
foo.cc:5:34: warning: unused variable 'cnt' [-Wunused-variable]
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                                  ^~~
foo.cc:13:18: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   13 |         while(a[j]!=0)
      |               ~~~^
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
foo.cc:15:18: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   15 |         a[j]+=b[j];
      |               ~~~^
foo.cc:5:26: note: while referencing 'b'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                          ^
foo.cc:15:13: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   15 |         a[j]+=b[j];
      |         ~~~~^~~~~~
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
foo.cc:19:20: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   19 |                 a[j]=0;
      |                 ~~~^
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
foo.cc:21:15: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   21 |         if(b[j]>0&&a[j]>0)
      |            ~~~^
foo.cc:5:26: note: while referencing 'b'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                          ^
foo.cc:21:23: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   21 |         if(b[j]>0&&a[j]>0)
      |                    ~~~^
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
foo.cc:24:20: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   24 |                 a[j]=0;
      |                 ~~~^
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
foo.cc:33:23: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   33 |                 if(a[j]%b[j]==0||a[j]%c[j]==0)
      |                    ~~~^
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
foo.cc:33:28: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   33 |                 if(a[j]%b[j]==0||a[j]%c[j]==0)
      |                         ~~~^
foo.cc:5:26: note: while referencing 'b'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                          ^
foo.cc:39:20: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   39 |                 a[j]=0;}
      |                 ~~~^
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
foo.cc:35:20: warning: array subscript 1 is above array bounds of 'unsigned int [1]' [-Warray-bounds]
   35 |                 a[j]=0; }
      |                 ~~~^
foo.cc:5:18: note: while referencing 'a'
    5 |     unsigned int a[]={0},b[]={0},cnt=0,n,i;
      |                  ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer 0a1 > NO 2ms 256.0 KiB
#2 Wrong Answer Read No, expect NO. 1ms 256.0 KiB
#3 Wrong Answer Read No, expect YES. 1ms 256.0 KiB
#4 Wrong Answer 0a1,3 > YES > YES > NO 2ms 256.0 KiB
#5 Wrong Answer Read No, expect YES. 1ms 384.0 KiB
#6 Wrong Answer 0a1,419 > YES > NO > YES > 1ms 256.0 KiB
#7 Wrong Answer 0a1,363 > NO > NO > YES > N 2ms 256.0 KiB
#8 Wrong Answer Read No, expect NO. 1ms 256.0 KiB
#9 Wrong Answer Read No, expect NO. 2ms 256.0 KiB
#10 Wrong Answer Read No, expect YES. 1ms 256.0 KiB
#11 Runtime Error Segmentation fault 2ms 384.0 KiB
#12 Runtime Error Segmentation fault 1ms 384.0 KiB
#13 Runtime Error Segmentation fault 4ms 384.0 KiB
#14 Runtime Error Segmentation fault 2ms 384.0 KiB
#15 Runtime Error Segmentation fault 2ms 384.0 KiB
#16 Runtime Error Segmentation fault 3ms 384.0 KiB
#17 Runtime Error Segmentation fault 3ms 396.0 KiB
#18 Runtime Error Segmentation fault 2ms 384.0 KiB
#19 Runtime Error Segmentation fault 3ms 384.0 KiB
#20 Runtime Error Segmentation fault 2ms 384.0 KiB

信息

递交者
类型
递交
题目
P1229 A 阅读程序
比赛
2022暑期青少年社团(告别赛)
语言
C++
递交时间
2022-08-21 18:53:44
评测时间
2022-08-21 18:53:44
评测机
分数
0
总耗时
46ms
峰值内存
396.0 KiB