結果

問題 No.429 CupShuffle
ユーザー convexineqconvexineq
提出日時 2021-02-04 09:15:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 211 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 104,076 KB
最終ジャッジ日時 2023-09-13 04:16:30
合計ジャッジ時間 3,282 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
76,124 KB
testcase_01 AC 68 ms
71,472 KB
testcase_02 AC 67 ms
71,608 KB
testcase_03 AC 73 ms
71,272 KB
testcase_04 AC 78 ms
71,572 KB
testcase_05 AC 68 ms
71,548 KB
testcase_06 AC 86 ms
76,296 KB
testcase_07 AC 84 ms
76,392 KB
testcase_08 AC 69 ms
71,376 KB
testcase_09 AC 82 ms
75,380 KB
testcase_10 AC 124 ms
78,060 KB
testcase_11 AC 211 ms
101,192 KB
testcase_12 AC 196 ms
100,136 KB
testcase_13 AC 207 ms
104,076 KB
testcase_14 AC 162 ms
94,612 KB
testcase_15 AC 67 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,x = map(int,input().split())
res = list(range(1,n+1))
for _ in range(x-1):
    a,b = map(int,input().split())
    res[a-1],res[b-1] = res[b-1],res[a-1]
input()
ab = [list(map(int,input().split())) for _ in range(k-x)]
*c, = map(int,input().split())
for a,b in ab[::-1]:
    c[a-1],c[b-1] = c[b-1],c[a-1]
print(*[i+1 for i in range(n) if res[i] != c[i]])
0