2 条题解
-
2
#include<bits/stdc++.h> using namespace std; int l,o,m; queue man; queue noman; int main(){ cin>>l>>o; cin>>m; for(int i=1;i<=l;i++){ man.push(i); } for(int i=1;i<=o;i++){ noman.push(i); } for(int j=1;j<=m;j++){ cout<<man.front()<<' '<<noman.front()<<endl; man.push(man.front()); man.pop(); noman.push(noman.front()); noman.pop(); }
return 0;
}
信息
- ID
- 547
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 10
- 标签
- 递交数
- 6
- 已通过
- 4
- 上传者