結果

問題 No.490 yukiソート
ユーザー TomoyarnTomoyarn
提出日時 2023-09-01 21:05:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 87,320 KB
実行使用メモリ 77,248 KB
最終ジャッジ日時 2023-09-01 21:05:56
合計ジャッジ時間 6,097 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
71,508 KB
testcase_01 AC 74 ms
71,468 KB
testcase_02 AC 74 ms
71,256 KB
testcase_03 AC 76 ms
71,484 KB
testcase_04 AC 86 ms
76,224 KB
testcase_05 AC 90 ms
76,204 KB
testcase_06 AC 88 ms
76,324 KB
testcase_07 AC 86 ms
76,472 KB
testcase_08 AC 87 ms
76,536 KB
testcase_09 AC 87 ms
76,224 KB
testcase_10 AC 89 ms
76,476 KB
testcase_11 AC 107 ms
76,540 KB
testcase_12 AC 87 ms
76,444 KB
testcase_13 AC 88 ms
76,396 KB
testcase_14 AC 150 ms
77,248 KB
testcase_15 AC 148 ms
77,172 KB
testcase_16 AC 150 ms
77,124 KB
testcase_17 AC 148 ms
77,116 KB
testcase_18 AC 146 ms
77,120 KB
testcase_19 AC 175 ms
76,896 KB
testcase_20 AC 149 ms
77,132 KB
testcase_21 AC 147 ms
77,032 KB
testcase_22 AC 147 ms
77,112 KB
testcase_23 AC 146 ms
76,916 KB
testcase_24 AC 72 ms
71,480 KB
testcase_25 AC 73 ms
71,172 KB
testcase_26 AC 77 ms
71,488 KB
testcase_27 AC 72 ms
71,344 KB
testcase_28 AC 77 ms
71,376 KB
testcase_29 AC 72 ms
71,472 KB
testcase_30 AC 72 ms
71,540 KB
testcase_31 AC 73 ms
71,348 KB
testcase_32 AC 77 ms
71,176 KB
testcase_33 AC 76 ms
71,328 KB
testcase_34 AC 75 ms
71,324 KB
testcase_35 AC 75 ms
71,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))

for i in range(1, 2 * n - 3):
    for p in range(i):
        q = i - p
        if p < q and p < n - 1 and q <= n - 1:
            if a[p] > a[q]:
                a[p], a[q] = a[q], a[p]
                
print(*a)
0