Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
121123 | 一只野生穹p | 舞林大会 | C++ | 通过 | 100 | 0 MS | 264 KB | 584 | 2024-01-21 15:24:56 |
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <queue> using namespace std; const int MAXN = 1e3 + 1e2; queue <int> m; queue <int> f; int x, y, k; int main() { scanf("%d %d %d", &x, &y, &k); for (int i = 1;i <= x;i++) m.push(i); for (int i = 1;i <= y;i++) f.push(i); int tx, ty; for (int i = 1;i <= k - 1;i++) { tx = m.front(); ty = f.front(); m.pop(); f.pop(); m.push(tx); f.push(ty); } tx = m.front(); ty = f.front(); m.pop(); f.pop(); printf("%d %d\n", tx, ty); return 0; }