結果
| 問題 | No.26 シャッフルゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-23 11:52:28 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 5,000 ms |
| コード長 | 418 bytes |
| 記録 | |
| コンパイル時間 | 1,029 ms |
| コンパイル使用メモリ | 214,500 KB |
| 実行使用メモリ | 16,768 KB |
| 最終ジャッジ日時 | 2026-07-05 18:37:25 |
| 合計ジャッジ時間 | 2,212 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)s; i < (int)e; i++)
int main() {
cin.tie(nullptr);
int N, M;
cin >> N >> M;
vector<bool> A(3, false);
A[N - 1] = true;
rep(t, 0, M) {
int P, Q;
cin >> P >> Q;
swap(A[P - 1], A[Q - 1]);
}
rep(i, 0, 3) if (A[i]) cout << i + 1 << '\n';
}