Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
121132 | 沈梓珺 | 舞林大会 | C++ | 通过 | 100 | 0 MS | 256 KB | 418 | 2024-01-21 15:26:31 |
#include<bits/stdc++.h> using namespace std; queue<int> m; queue<int> n; int x,y,k; int main(){ cin>>x>>y>>k; for(int i=1;i<=x;i++){ m.push(i); } for(int i=1;i<=y;i++){ n.push(i); } int b,c; for(int i=1;i<=k-1;i++){ b=m.front(); c=n.front(); m.pop(); n.pop(); m.push(b); n.push(c); } b=m.front(); c=n.front(); m.pop(); n.pop(); cout<<b<<" "<<c; return 0; }