using System; public class P { public int id { get; set; } public int s { get; set; } public int t { get; set; } } public class Hello { static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var n = int.Parse(line[0]); var q = int.Parse(line[1]); getAns(n, q); } static void getAns(int n, int q) { var ps = new P[q]; var stmax = 100010; var map = new int[stmax]; for (int i = 0; i < q; i++) { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]) - 1; var b = int.Parse(line[1]); var c = int.Parse(line[2]); map[b]++; map[c]--; ps[i] = new P { id = a, s = b, t = c }; } for (int i = 1; i < stmax; i++) map[i] += map[i - 1]; var map2 = new double[stmax]; for (int i = 0; i < stmax; i++) map2[i] = map[i] == 0 ? 0 : 1d / map[i]; var map3 = new double[stmax + 1]; map3[0] = 0d; for (int i = 1; i < stmax + 1; i++) map3[i] = map3[i - 1] + map2[i - 1]; var ans = new double[n]; foreach (var x in ps) ans[x.id] += map3[x.t] - map3[x.s]; Console.WriteLine(string.Join("\n", ans)); } }