Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:22:24: error: no match for 'operator[]' (operand types are 'std::queue<node>' and 'int')
   22 |                 int x=q[f][0],bs=q[f][1];
      |                        ^
/in/foo.cc:25:31: error: 'bs' was not declared in this scope; did you mean 'abs'?
   25 |                         cout<<bs<<endl;return 0;
      |                               ^~
      |                               abs
/in/foo.cc:29:26: error: no match for 'operator[]' (operand types are 'std::queue<node>' and 'int')
   29 |                         q[++r][0]=x+1;q[r][1]=bs+1;vis[x+1]=1;
      |                          ^
/in/foo.cc:29:40: error: no match for 'operator[]' (operand types are 'std::queue<node>' and 'int')
   29 |                         q[++r][0]=x+1;q[r][1]=bs+1;vis[x+1]=1;
      |                                        ^
/in/foo.cc:29:47: error: 'bs' was not declared in this scope; did you mean 'abs'?
   29 |                         q[++r][0]=x+1;q[r][1]=bs+1;vis[x+1]=1;
      |                                               ^~
      |                                               abs
/in/foo.cc:33:26: error: no match for 'operator[]' (operand types are 'std::queue<node>' and 'int')
   33 |                         q[++r][0]=x-1;q[r][1]=bs+1;vis[x-1]=1;
      |                          ^
/in/foo.cc:33:40: error: no match for 'operator[]' (operand types are 'std::queue<node>' and 'int')
   33 |                         q[++r][0]=x-1;q[r][1]=bs+1;vis[x-1]=1;
      |                                        ^
/in/foo.cc:33:47: error: 'bs' was not declared in this scope; did you mean 'abs'?
   33 |                         q[++r][0]=x-1;q[r][1]=bs+1;vis[x-1]=1;
      |                                               ^~
      |                                               abs
/in/foo.cc:37:26: error: no match for 'operator[]' (operand types are 'std::queue<node>' and 'int')
   37 |                         q[++r][0]=x*2;q[r][1]=bs+1;vis[x*2]=1;
      |                          ^
/in/foo.cc:37:40: error: no match for 'operator[]' (operand types are 'std::queue<node>' and 'int')
   37 |                         q[++r][0]=x*2;q[r][1]=bs+1;vis[x*2]=1;
      |                                        ^
/in/foo.cc:37:47: error: 'bs' was not declared in this scope; did you mean 'abs'?
   37 |                         q[++r][0]=x*2;q[r][1]=bs+1;vis[x*2]=1;
      |                                               ^~
      |                                               abs

信息

递交者
类型
递交
题目
P2079 抓住那头牛
语言
C++
递交时间
2026-04-05 10:09:25
评测时间
2026-04-05 10:09:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes