結果
| 問題 |
No.26 シャッフルゲーム
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-07-02 21:45:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 5,000 ms |
| コード長 | 204 bytes |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,992 KB |
| 最終ジャッジ日時 | 2024-07-02 21:46:02 |
| 合計ジャッジ時間 | 1,259 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
N = int(input())
M = int(input())
bs = [False] * 3
bs[N-1] = True
for _ in range(M):
P, Q = map(lambda x: int(x)-1, input().split())
bs[P], bs[Q] = bs[Q], bs[P]
ans = bs.index(True)
print(ans+1)
norioc