結果

問題 No.2092 Conjugation
ユーザー hiragnhiragn
提出日時 2022-11-30 13:50:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,404 KB
最終ジャッジ日時 2024-04-16 13:43:49
合計ジャッジ時間 3,027 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,752 KB
testcase_01 AC 33 ms
10,624 KB
testcase_02 AC 32 ms
10,752 KB
testcase_03 WA -
testcase_04 AC 30 ms
10,752 KB
testcase_05 AC 31 ms
10,752 KB
testcase_06 AC 30 ms
10,752 KB
testcase_07 AC 92 ms
13,224 KB
testcase_08 AC 123 ms
18,972 KB
testcase_09 AC 107 ms
17,208 KB
testcase_10 AC 109 ms
17,736 KB
testcase_11 AC 109 ms
17,836 KB
testcase_12 AC 106 ms
17,432 KB
testcase_13 AC 103 ms
16,384 KB
testcase_14 AC 101 ms
16,232 KB
testcase_15 AC 107 ms
17,100 KB
testcase_16 AC 131 ms
20,204 KB
testcase_17 AC 139 ms
20,732 KB
testcase_18 AC 135 ms
21,404 KB
testcase_19 AC 54 ms
12,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    n = int(input())
    arr = list(map(int, input().split()))
    if n == 1:
        exit(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