結果
| 問題 | No.2462 七人カノン |
| コンテスト | |
| ユーザー |
mymelochan
|
| 提出日時 | 2023-09-08 21:38:49 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 855 bytes |
| 記録 | |
| コンパイル時間 | 371 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 102,144 KB |
| 最終ジャッジ日時 | 2026-03-13 07:15:49 |
| 合計ジャッジ時間 | 3,944 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | WA * 23 |
ソースコード
#############################################################
import sys
sys.setrecursionlimit(10**7)
from heapq import heappop,heappush
from collections import deque,defaultdict,Counter
from bisect import bisect_left, bisect_right
from itertools import product,combinations,permutations
ipt = sys.stdin.readline
def iin():
return int(ipt())
def lmin():
return list(map(int,ipt().split()))
MOD = 998244353
#############################################################
N,Q = lmin()
L = [lmin() for _ in range(Q)]
S = [0]*(10**5+10)
for _,s,t in L:
S[s] += 1
S[t+1] += -1
for i in range(1,10**5+1):
S[i] += S[i-1]
T = []
for s in S:
if s:
T.append(1/s)
else:
T.append(0)
for i in range(1,10**5+1):
T[i] += T[i-1]
ans = [0]*N
for i,s,t in L:
ans[i-1] += T[t+1]-T[s]
for a in ans:
print(a)
mymelochan