結果

問題 No.2092 Conjugation
ユーザー ygd.ygd.
提出日時 2022-10-07 21:51:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 836 bytes
コンパイル時間 1,144 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 20,432 KB
最終ジャッジ日時 2023-09-03 01:33:18
合計ジャッジ時間 2,754 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
8,924 KB
testcase_01 AC 22 ms
8,880 KB
testcase_02 AC 22 ms
8,760 KB
testcase_03 AC 22 ms
8,888 KB
testcase_04 AC 22 ms
8,772 KB
testcase_05 AC 21 ms
8,820 KB
testcase_06 AC 21 ms
8,776 KB
testcase_07 AC 67 ms
12,036 KB
testcase_08 AC 92 ms
17,448 KB
testcase_09 AC 80 ms
16,316 KB
testcase_10 AC 81 ms
16,420 KB
testcase_11 AC 81 ms
16,624 KB
testcase_12 AC 80 ms
16,192 KB
testcase_13 AC 73 ms
15,596 KB
testcase_14 AC 74 ms
15,220 KB
testcase_15 AC 81 ms
16,184 KB
testcase_16 AC 103 ms
19,144 KB
testcase_17 AC 109 ms
20,432 KB
testcase_18 AC 106 ms
20,176 KB
testcase_19 AC 41 ms
10,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#input = sys.stdin.readline
#input = sys.stdin.buffer.readline #文字列はダメ
#sys.setrecursionlimit(1000000)
import math
import bisect
#import itertools
#import random
from heapq import heapify, heappop, heappush
from collections import defaultdict 
#from collections import deque
import copy #DeepCopy: hoge = [_[:] for _ in hogehoge]
#from functools import lru_cache
#@lru_cache(maxsize=None)
MOD = pow(10,9) + 7
#MOD = 998244353
#dx = [1,0,-1,0]
#dy = [0,1,0,-1]
#dx8 = [1,1,0,-1,-1,-1,0,1]
#dy8 = [0,1,1,1,0,-1,-1,-1]

def main():
    N = int(input())
    A = list(map(int,input().split()))

    imos = [0]*A[0]

    for a in A:
        imos[a-1] -= 1
    
    # print(imos)

    ans = [N]
    for i in range(A[0]-1):
        ans.append(imos[i] + ans[i])
    
    print(*ans)


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