結果

問題 No.490 yukiソート
ユーザー 6soukiti296soukiti29
提出日時 2017-03-22 00:53:53
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,170 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 10,512 KB
実行使用メモリ 8,384 KB
最終ジャッジ日時 2023-09-18 15:38:59
合計ジャッジ時間 13,713 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,936 KB
testcase_01 AC 17 ms
7,764 KB
testcase_02 AC 16 ms
7,824 KB
testcase_03 AC 16 ms
7,736 KB
testcase_04 AC 42 ms
7,816 KB
testcase_05 AC 40 ms
7,976 KB
testcase_06 AC 40 ms
7,808 KB
testcase_07 AC 39 ms
7,732 KB
testcase_08 AC 41 ms
7,876 KB
testcase_09 AC 40 ms
7,772 KB
testcase_10 AC 41 ms
7,776 KB
testcase_11 AC 40 ms
7,776 KB
testcase_12 AC 40 ms
7,768 KB
testcase_13 AC 41 ms
7,812 KB
testcase_14 AC 1,132 ms
8,188 KB
testcase_15 AC 1,170 ms
8,304 KB
testcase_16 AC 1,150 ms
8,260 KB
testcase_17 AC 1,110 ms
8,244 KB
testcase_18 AC 1,093 ms
8,176 KB
testcase_19 AC 1,136 ms
8,252 KB
testcase_20 AC 1,093 ms
8,200 KB
testcase_21 AC 1,130 ms
8,364 KB
testcase_22 AC 1,074 ms
8,236 KB
testcase_23 AC 1,099 ms
8,384 KB
testcase_24 AC 16 ms
7,760 KB
testcase_25 AC 16 ms
7,748 KB
testcase_26 AC 16 ms
7,876 KB
testcase_27 AC 16 ms
7,876 KB
testcase_28 AC 15 ms
7,940 KB
testcase_29 AC 15 ms
7,756 KB
testcase_30 AC 16 ms
7,880 KB
testcase_31 AC 16 ms
7,760 KB
testcase_32 AC 15 ms
7,816 KB
testcase_33 AC 16 ms
7,848 KB
testcase_34 AC 16 ms
7,876 KB
testcase_35 AC 16 ms
7,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int,input().split()))
for i in range(1,2 * n - 3):
	for p in range(i // 2 + 1):
		q = i - p
		if q < n and A[p] > A[q]:
			A[p],A[q] = A[q],A[p]
print(" ".join(map(str,A)))
0