結果

問題 No.2154 あさかつの参加人数
ユーザー terasaterasa
提出日時 2022-12-09 21:52:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 393 ms / 2,000 ms
コード長 637 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 103,576 KB
最終ジャッジ日時 2024-04-22 21:52:24
合計ジャッジ時間 11,903 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 384 ms
103,040 KB
testcase_01 AC 387 ms
103,576 KB
testcase_02 AC 393 ms
103,552 KB
testcase_03 AC 385 ms
103,080 KB
testcase_04 AC 382 ms
103,552 KB
testcase_05 AC 185 ms
78,312 KB
testcase_06 AC 310 ms
89,472 KB
testcase_07 AC 231 ms
94,156 KB
testcase_08 AC 246 ms
95,980 KB
testcase_09 AC 145 ms
89,260 KB
testcase_10 AC 230 ms
91,904 KB
testcase_11 AC 361 ms
100,472 KB
testcase_12 AC 281 ms
93,112 KB
testcase_13 AC 192 ms
84,488 KB
testcase_14 AC 301 ms
92,416 KB
testcase_15 AC 239 ms
95,004 KB
testcase_16 AC 297 ms
95,232 KB
testcase_17 AC 329 ms
92,800 KB
testcase_18 AC 322 ms
97,136 KB
testcase_19 AC 109 ms
80,768 KB
testcase_20 AC 296 ms
96,992 KB
testcase_21 AC 140 ms
88,236 KB
testcase_22 AC 175 ms
97,152 KB
testcase_23 AC 319 ms
97,408 KB
testcase_24 AC 342 ms
100,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from typing import List, Tuple, Callable, TypeVar, Optional
import sys
import itertools
import heapq
import bisect
import math
from collections import deque, defaultdict
from functools import lru_cache, cmp_to_key

input = sys.stdin.readline

if __file__ != 'prog.py':
    sys.setrecursionlimit(10 ** 6)


def readints(): return map(int, input().split())
def readlist(): return list(readints())
def readstr(): return input()[:-1]


N, M = readints()
D = [0] * (N + 10)
for _ in range(M):
    r, l = readints()
    l -= 1
    D[l] += 1
    D[r] -= 1
for i in range(N):
    D[i + 1] += D[i]
ans = D[:N]
ans.reverse()
print(*ans, sep='\n')
0