結果

問題 No.2092 Conjugation
ユーザー hiragn
提出日時 2022-11-30 12:24:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 21,276 KB
最終ジャッジ日時 2024-10-07 09:08:23
合計ジャッジ時間 3,335 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    n = int(input())
    arr = list(map(int, input().split()))
    if n == 1:
        print(*arr)

    mx = max(arr)
    ans = [0] * (mx + 1)
    for a in arr:
        ans[a] += 1
    for i in range(mx - 1, 0, -1):
        ans[i] += ans[i + 1]
    print(*ans[1:])


if __name__ == "__main__":
    main()
0