結果

問題 No.490 yukiソート
ユーザー kiricreamcheese
提出日時 2017-03-10 23:27:40
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,646 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 6,940 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 10:26:34
合計ジャッジ時間 18,323 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python

n=input()
a_list=map(int,raw_input().split(" "))
buf=0

for i in range(1,2*n-3):
    for p in range(n-1):
        q=i-p
        if p<q and q<=n-1:
            if a_list[p]>a_list[q]:
                a_list[p],a_list[q]= a_list[q],a_list[p]
#                buf=a_list[p]
#                a_list[p]=a_list[q]
#                a_list[q]=buf

print " ".join(map(str,a_list))
0