int c[3],a[3d5]; { int n,m,l,r,b; char t; rd(n,m); rep(m){ rd(l--,r,t); b=(t+1)%3; while(l?=r; l=n; } } wt(c(3)); }