結果

問題 No.490 yukiソート
ユーザー takakintakakin
提出日時 2020-04-21 20:30:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 299 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-04-17 11:32:59
合計ジャッジ時間 2,521 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,624 KB
testcase_01 WA -
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 30 ms
10,624 KB
testcase_04 AC 30 ms
10,752 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 AC 30 ms
10,752 KB
testcase_07 AC 30 ms
10,752 KB
testcase_08 AC 30 ms
10,752 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 AC 30 ms
10,752 KB
testcase_25 AC 29 ms
10,624 KB
testcase_26 WA -
testcase_27 AC 29 ms
10,624 KB
testcase_28 AC 29 ms
10,624 KB
testcase_29 WA -
testcase_30 AC 30 ms
10,752 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input()[-1])
A=[int(i) for i in input().split()]
if A[-1]==max(A):
  A.sort()
  print(*A)
else:
  a=A[0]
  ind=0
  for i in range(1,n):
    if A[i]>a:
      a=A[i]
      ind=i
  B=A[:i]+A[i+1:]
  B.sort()
  B.insert(-1,a)
  print(*B)
    
0