Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
121220 | 李承瀚 | 舞林大会 | C++ | 通过 | 100 | 0 MS | 268 KB | 323 | 2024-01-21 15:54:51 |
#include<bits/stdc++.h> using namespace std; queue <int> m,n; int main() { int nn,mm,k; cin>>nn>>mm>>k; for(int i=1;i<=nn;i++) n.push(i); for(int i=1;i<=mm;i++) m.push(i); for(int i=1;i<=k-1;i++) { m.push(m.front()); m.pop(); n.push(n.front()); n.pop(); } cout<<n.front()<<" "<<m.front(); }