結果
| 問題 |
No.490 yukiソート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-12 18:24:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 17,692 KB |
| 最終ジャッジ日時 | 2024-06-30 00:32:32 |
| 合計ジャッジ時間 | 4,838 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 14 TLE * 1 -- * 19 |
ソースコード
n=int(input())
a=list(map(int,input().split()))
while True:
ok = False
for i in range(1, 2*n-3):
for p in range(0, n-1):
q = i-p
if p >= q or not (0 <= p < n and 0 <= q < n):
continue
if a[p] > a[q]:
a[p],a[q]=a[q],a[p]
ok = True
if not ok:
break
print(' '.join(map(str,a)))