3 条题解
-
0Guest
-
1
#include<bits/stdc++.h>
using namespace std;
queue<int>an,nv;
int main()
{
int m,n,w; cin>>m>>n>>w; for(int i=1;i<=m;i++) an.push(i); for(int i=1;i<=n;i++) nv.push(i); for(int i=1;i<=w;i++) { cout<<an.front()<<" "<<nv.front()<<endl; an.push(an.front()); nv.push(nv.front()); an.pop(); nv.pop(); } return 0;
}
信息
- ID
- 255
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- 递交数
- 25
- 已通过
- 22
- 上传者