結果
| 問題 |
No.490 yukiソート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-12 18:34:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 130 ms / 2,000 ms |
| コード長 | 387 bytes |
| コンパイル時間 | 1,532 ms |
| コンパイル使用メモリ | 82,012 KB |
| 実行使用メモリ | 65,380 KB |
| 最終ジャッジ日時 | 2024-06-30 00:32:39 |
| 合計ジャッジ時間 | 3,681 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
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)))