結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,880 KB
testcase_01 AC 30 ms
10,880 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 31 ms
10,752 KB
testcase_05 AC 30 ms
10,880 KB
testcase_06 AC 29 ms
10,752 KB
testcase_07 AC 93 ms
13,224 KB
testcase_08 AC 124 ms
18,988 KB
testcase_09 AC 107 ms
17,208 KB
testcase_10 AC 109 ms
17,612 KB
testcase_11 AC 109 ms
17,828 KB
testcase_12 AC 107 ms
17,436 KB
testcase_13 AC 103 ms
16,512 KB
testcase_14 AC 101 ms
16,488 KB
testcase_15 AC 108 ms
17,220 KB
testcase_16 AC 131 ms
20,204 KB
testcase_17 AC 138 ms
20,796 KB
testcase_18 AC 137 ms
21,488 KB
testcase_19 AC 53 ms
12,136 KB
権限があれば一括ダウンロードができます

ソースコード

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