結果
問題 |
No.26 シャッフルゲーム
|
ユーザー |
![]() |
提出日時 | 2020-03-13 15:57:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-22 06:04:04 |
合計ジャッジ時間 | 1,098 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#!/usr/bin/env python3 import sys input = sys.stdin.readline n = int(input()) m = int(input()) cup = [0, 0, 0] cup[n - 1] = 1 for _ in range(m): p, q = map(int, input().split()) p -= 1; q -= 1 cup[p], cup[q] = cup[q], cup[p] for i, item in enumerate(cup): if item: print(i+1)