結果
問題 | No.429 CupShuffle |
ユーザー |
|
提出日時 | 2021-02-24 23:35:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 503 ms / 2,000 ms |
コード長 | 334 bytes |
コンパイル時間 | 122 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 43,188 KB |
最終ジャッジ日時 | 2024-09-25 00:14:18 |
合計ジャッジ時間 | 3,239 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
i,r=input,range n,k,t=map(int,i().split()) L=[0]*k for j in r(k):L[j]=i().split() B=list(map(int,i().split())) A=sorted(B) for j in r(t-1): x,y=int(L[j][0])-1,int(L[j][1])-1 A[x],A[y]=A[y],A[x] for j in r(k-1,t-1,-1): x,y=int(L[j][0])-1,int(L[j][1])-1 B[x],B[y]=B[y],B[x] C=[] for j in r(n): if A[j]!=B[j]:C.append(j+1) print(*C)