在c++里三哥样例都过了,交上去就ce。
编译信息
编译失败
/tmp/compiler_lgyld2_j/src:17:12: 错误:实参 1 的类型/值不匹配,在‘template<class _Tp, class _Sequence> class std::queue’的模板参数列表中
17 | queue<index> q;
| ^
/tmp/compiler_lgyld2_j/src:17:12: 附注:需要一个类型,却给出了‘index’
/tmp/compiler_lgyld2_j/src:17:12: 错误:模板第 2 个参数无效
/tmp/compiler_lgyld2_j/src:18:10: 错误:变量或字段‘bfs’声明为 void
18 | void bfs(index s){
| ^~~~~
/tmp/compiler_lgyld2_j/src:18:15: 错误:expected ‘)’ before ‘s’
18 | void bfs(index s){
| ~ ^~
| )
/tmp/compiler_lgyld2_j/src: 在函数‘int main()’中:
/tmp/compiler_lgyld2_j/src:50:3: 错误:‘bfs’ was not declared in this scope; did you mean ‘ffs’?
50 | bfs(start);
| ^~~
| ffs
求解决方案