結果
| 問題 | No.26 シャッフルゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-18 12:07:31 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 5,000 ms |
| + 237µs | |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 95,972 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-07-26 18:16:34 |
| 合計ジャッジ時間 | 2,059 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
N = int(input())
M = int(input())
sw = [list(map(int, input().split())) for _ in range(M)]
pos = list(range(1, 4))
for p, q in sw:
pos[p - 1], pos[q - 1] = pos[q - 1], pos[p - 1]
print(pos.index(N) + 1)