結果

問題 No.490 yukiソート
ユーザー kiricreamcheesekiricreamcheese
提出日時 2017-03-10 23:27:40
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,544 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 554 ms
コンパイル使用メモリ 6,712 KB
実行使用メモリ 6,396 KB
最終ジャッジ日時 2023-09-06 16:03:01
合計ジャッジ時間 17,458 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,996 KB
testcase_01 AC 11 ms
5,952 KB
testcase_02 AC 11 ms
5,976 KB
testcase_03 AC 10 ms
6,040 KB
testcase_04 AC 46 ms
6,096 KB
testcase_05 AC 46 ms
6,064 KB
testcase_06 AC 45 ms
6,044 KB
testcase_07 AC 46 ms
6,076 KB
testcase_08 AC 45 ms
6,108 KB
testcase_09 AC 45 ms
6,008 KB
testcase_10 AC 46 ms
6,000 KB
testcase_11 AC 45 ms
6,048 KB
testcase_12 AC 45 ms
5,984 KB
testcase_13 AC 44 ms
6,064 KB
testcase_14 AC 1,529 ms
6,364 KB
testcase_15 AC 1,539 ms
6,396 KB
testcase_16 AC 1,542 ms
6,388 KB
testcase_17 AC 1,536 ms
6,376 KB
testcase_18 AC 1,526 ms
6,316 KB
testcase_19 AC 1,538 ms
6,344 KB
testcase_20 AC 1,538 ms
6,368 KB
testcase_21 AC 1,531 ms
6,268 KB
testcase_22 AC 1,530 ms
6,316 KB
testcase_23 AC 1,544 ms
6,268 KB
testcase_24 AC 11 ms
5,952 KB
testcase_25 AC 10 ms
5,964 KB
testcase_26 AC 10 ms
6,020 KB
testcase_27 AC 10 ms
6,020 KB
testcase_28 AC 10 ms
6,080 KB
testcase_29 AC 12 ms
6,024 KB
testcase_30 AC 11 ms
6,008 KB
testcase_31 AC 11 ms
6,068 KB
testcase_32 AC 11 ms
5,960 KB
testcase_33 AC 10 ms
6,000 KB
testcase_34 AC 11 ms
5,952 KB
testcase_35 AC 11 ms
5,980 KB
権限があれば一括ダウンロードができます

ソースコード

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