結果

問題 No.490 yukiソート
ユーザー nebukuro09nebukuro09
提出日時 2017-03-10 22:31:14
言語 PyPy2
(7.3.13)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 891 ms
コンパイル使用メモリ 77,920 KB
実行使用メモリ 79,288 KB
最終ジャッジ日時 2023-09-06 15:35:03
合計ジャッジ時間 5,327 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
76,420 KB
testcase_01 AC 73 ms
76,420 KB
testcase_02 AC 74 ms
76,428 KB
testcase_03 AC 73 ms
76,428 KB
testcase_04 AC 86 ms
79,084 KB
testcase_05 AC 86 ms
78,752 KB
testcase_06 AC 86 ms
79,184 KB
testcase_07 AC 86 ms
78,944 KB
testcase_08 AC 87 ms
78,804 KB
testcase_09 AC 86 ms
78,956 KB
testcase_10 AC 85 ms
78,764 KB
testcase_11 AC 87 ms
78,904 KB
testcase_12 AC 87 ms
78,976 KB
testcase_13 AC 87 ms
78,916 KB
testcase_14 AC 130 ms
78,888 KB
testcase_15 AC 129 ms
79,288 KB
testcase_16 AC 133 ms
79,124 KB
testcase_17 AC 130 ms
79,088 KB
testcase_18 AC 129 ms
79,120 KB
testcase_19 AC 129 ms
79,124 KB
testcase_20 AC 129 ms
79,080 KB
testcase_21 AC 132 ms
79,096 KB
testcase_22 AC 130 ms
78,880 KB
testcase_23 AC 128 ms
79,108 KB
testcase_24 AC 74 ms
76,248 KB
testcase_25 AC 74 ms
76,656 KB
testcase_26 AC 72 ms
76,552 KB
testcase_27 AC 73 ms
76,548 KB
testcase_28 AC 73 ms
76,552 KB
testcase_29 AC 73 ms
76,420 KB
testcase_30 AC 73 ms
76,292 KB
testcase_31 AC 74 ms
76,172 KB
testcase_32 AC 74 ms
76,292 KB
testcase_33 AC 74 ms
76,692 KB
testcase_34 AC 73 ms
76,456 KB
testcase_35 AC 72 ms
76,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
A = map(int, raw_input().split())

for i in xrange(1, 2*n-3):
    for p in xrange(i+1):
        if p > n-1:
            break
        q = i - p
        if (q <= p or q > n-1):
            continue
        if A[p] > A[q]:
            A[p], A[q] = A[q], A[p]
print " ".join(map(str, A))
0