結果

問題 No.3665 Two Important Tasks
コンテスト
ユーザー t5ugu
提出日時 2026-08-22 00:20:26
言語 PyPy3
(7.3.23)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 589 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 277 ms
コンパイル使用メモリ 95,972 KB
実行使用メモリ 87,168 KB
最終ジャッジ日時 2026-08-30 13:02:52
合計ジャッジ時間 7,307 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# 制約チェック
line = list(map(int, input().split()))
assert len(line) == 2
N, Q = line
assert 2 <= N <= 200000
assert 2 <= Q <= 200000

p = [0] * (N+2)

for _ in range(N):
    line = list(map(int, input().split()))
    assert len(line) == 3
    L, R, C = line
    assert 1 <= L <= R <= N
    p[L] += 1
    p[R + 1] -= 1

    assert 1 <= C <= 1_000_000_000

for i in range(0, N+1):
    p[i+1] += p[i]
    assert 0 <= p[i] <= 5
assert 0 <= p[N+1] <= 5

for _ in range(Q):
    line = list(map(int, input().split()))
    assert len(line) == 2
    a, b = line
    assert 1 <= a < b <= N
0