#include using ll = long long; using llu = long long unsigned; using namespace std; #define MOD 998244353 int main() { int N, Q; cin >> N >> Q; vector I(Q), S(Q), T(Q); map data; for (int i=0; i> I[i] >> S[i] >> T[i]; data[S[i]-1]++; data[S[i]]++; data[S[i]+1]++; data[T[i]-1]++; data[T[i]]++; data[T[i]+1]++; } int stop = *max_element(T.begin(), T.end()); vector meda(stop+2); for (auto itr=data.begin(); itr!=data.end(); itr++) { int tmp = itr->first; if (tmp < 0) { continue; } int cnt = 0; for (int i=0; i ret(N, 0.0); for (int i=0; i