結果
| 問題 | No.26 シャッフルゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-18 12:07:31 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 5,000 ms |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 85,536 KB |
| 実行使用メモリ | 54,512 KB |
| 最終ジャッジ日時 | 2026-03-06 08:13:16 |
| 合計ジャッジ時間 | 1,213 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)