結果

問題 No.26 シャッフルゲーム
ユーザー shamioshamio
提出日時 2020-06-01 20:41:06
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 193 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-08-14 12:03:21
合計ジャッジ時間 988 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,752 KB
testcase_01 AC 16 ms
7,752 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 16 ms
7,832 KB
testcase_04 AC 15 ms
7,964 KB
testcase_05 AC 15 ms
7,848 KB
testcase_06 AC 16 ms
7,824 KB
testcase_07 AC 15 ms
7,856 KB
testcase_08 AC 16 ms
7,936 KB
testcase_09 AC 16 ms
7,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = int(input())
pq = [list(map(int, input().split())) for _ in range(m)]

li = [0] * 4
li[n] = 1
for p, q in pq:
    li[p], li[q] = li[q], li[p]

ans = li.index(1)
print(ans)
0