#include #include #include #include using namespace std; int main(){ int n, q; cin >> n >> q; vector id(q), s(q), t(q); for(int i = 0; i < q; i++){ cin >> id[i] >> s[i] >> t[i]; id[i]--; s[i]++; t[i]++; } const int lim = 100010; vector tot(lim, 0.0); vector cnt(lim, 0); for(int i = 0; i < q; i++){ cnt[s[i]]++; cnt[t[i]]--; } for(int i = 1; i < lim; i++) cnt[i] += cnt[i-1]; for(int i = 0; i < lim-5; i++){ if(0 < cnt[i]) tot[i] += 1.0/cnt[i]; tot[i+1] += tot[i]; } vector ans(n, 0.0); for(int i = 0; i < q; i++){ ans[id[i]] += tot[t[i]-1]-tot[s[i]-1]; } for(auto &it: ans) cout << fixed << setprecision(10) << it << '\n'; return 0; }