import sys input = sys.stdin.readline N,Q=map(int,input().split()) Query=[list(map(int,input().split())) for i in range(Q)] TIME=[0]*(10**5+1) for i,s,t in Query: TIME[s]+=1 TIME[t]-=1 for i in range(1,10**5+1): TIME[i]+=TIME[i-1] LIST=[0] for i in range(10**5+1): if TIME[i]!=0: LIST.append(LIST[-1]+1/TIME[i]) else: LIST.append(0) ANS=[0]*N for i,s,t in Query: ANS[i-1]+=LIST[t]-LIST[s] for ans in ANS: print(ans)