結果
| 問題 |
No.429 CupShuffle
|
| コンテスト | |
| ユーザー |
h_noson
|
| 提出日時 | 2017-01-26 13:59:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 443 ms / 2,000 ms |
| コード長 | 435 bytes |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 25,596 KB |
| 最終ジャッジ日時 | 2024-12-23 11:38:41 |
| 合計ジャッジ時間 | 3,655 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
[n,k,x] = map(int,input().split(' '))
x -= 1
s = [i for i in range(1,n+1)]
tmp = s[:]
for i in range(k):
if i == x:
input()
continue
[a,b] = map(int,input().split(' '))
a -= 1
b -= 1
s[a],s[b] = s[b],s[a]
if i == x-1:
tmp = s[:]
c = list(map(int,input().split(' ')))
t = [s[i] for i in range(n) if s[i] != c[i]]
for i in range(n):
if tmp[i] in t:
print(i+1,end=' ')
print("")
h_noson