結果
問題 |
No.5001 排他的論理和でランニング
|
ユーザー |
![]() |
提出日時 | 2020-06-27 19:58:46 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 252 ms / 1,500 ms |
コード長 | 224 bytes |
コンパイル時間 | 243 ms |
実行使用メモリ | 85,568 KB |
スコア | 35,093,958 |
最終ジャッジ日時 | 2020-06-27 19:59:02 |
ジャッジサーバーID (参考情報) |
judge7 / judge9 |
純コード判定しない問題か言語 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
n,m=list(map(int,input().split())) a=list(map(int,input().split())) a.sort() a.reverse() t=0 s=[] l=0 for i in range(n): if (t<t^a[i]) or (n-i+l==m): s.append(a[i]) t=t^a[i] l+=1 for i in s: print(i,end=" ")