Wrong Answer

/in/foo.cc: In function 'void js(int)':
/in/foo.cc:11:18: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
   11 |         gra[xb][4]=b*2;
      |         ~~~~~~~~~^
/in/foo.cc:3:9: note: while referencing 'gra'
    3 | int n,k,gra[1000005][4],xb,visited[1000005],num,flag,ok,ans=1;
      |         ^~~
In function 'void js(int)',
    inlined from 'void bfs(int)' at /in/foo.cc:15:4:
/in/foo.cc:11:18: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
   11 |         gra[xb][4]=b*2;
      |         ~~~~~~~~~^
/in/foo.cc: In function 'void bfs(int)':
/in/foo.cc:3:9: note: while referencing 'gra'
    3 | int n,k,gra[1000005][4],xb,visited[1000005],num,flag,ok,ans=1;
      |         ^~~
/in/foo.cc:19:80: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
   19 |                 com1.push(gra[xb][2]),com1.push(gra[xb][3]),com1.push(gra[xb][4]);
      |                                                                       ~~~~~~~~~^
/in/foo.cc:3:9: note: while referencing 'gra'
    3 | int n,k,gra[1000005][4],xb,visited[1000005],num,flag,ok,ans=1;
      |         ^~~
/in/foo.cc:20:100: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
   20 |                 visited[gra[xb][1]]=1,visited[gra[xb][2]]=1,visited[gra[xb][3]]=1,visited[gra[xb][4]]=1;
      |                                                                                           ~~~~~~~~~^
/in/foo.cc:3:9: note: while referencing 'gra'
    3 | int n,k,gra[1000005][4],xb,visited[1000005],num,flag,ok,ans=1;
      |         ^~~
In function 'void js(int)',
    inlined from 'void bfs(int)' at /in/foo.cc:27:6:
/in/foo.cc:11:18: warning: array subscript 4 is above array bounds of 'int [4]' [-Warray-bounds]
   11 |         gra[xb][4]=b*2;
      |         ~~~~~~~~~^
/in/foo.cc: In function 'void bfs(int)':
/in/foo.cc:3:9: note: while referencing 'gra'
    3 | int n,k,gra[1000005][4],xb,visited[1000005],num,flag,ok,ans=1;
      |         ^~~
# 状态 耗时 内存占用
#1 Wrong Answer 10ms 580.0 KiB
#2 Accepted 1ms 344.0 KiB
#3 Wrong Answer 1ms 532.0 KiB
#4 Accepted 1ms 532.0 KiB
#5 Wrong Answer 10ms 584.0 KiB
#6 Wrong Answer 10ms 576.0 KiB
#7 Wrong Answer 10ms 576.0 KiB
#8 Wrong Answer 10ms 572.0 KiB
#9 Wrong Answer 10ms 592.0 KiB
#10 Wrong Answer 10ms 584.0 KiB
#11 Wrong Answer 10ms 580.0 KiB
#12 Wrong Answer 10ms 588.0 KiB
#13 Wrong Answer 9ms 580.0 KiB

信息

递交者
类型
递交
题目
P2079 抓住那头牛
语言
C++
递交时间
2026-03-29 17:18:54
评测时间
2026-03-29 17:18:54
评测机
分数
14
总耗时
108ms
峰值内存
592.0 KiB