結果

問題 No.490 yukiソート
コンテスト
ユーザー r_ishida
提出日時 2026-01-08 06:57:04
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
AC  
実行時間 1,942 ms / 2,000 ms
コード長 528 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 739 ms
コンパイル使用メモリ 20,804 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2026-01-08 06:57:30
合計ジャッジ時間 24,460 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

n = I()
a = LI()

for i in range(1, 2*n-3):
    for p in range(i//2+1):
        q = i - p
        if q <= p or q >= n:
            continue
        if a[p] > a[q]:
            a[p], a[q] = a[q], a[p]

print(*a)
0