#include using namespace std; int main(){ int n,k; cin >> n >> k; vector> a(k); for(int i=0;i> at >> ct; a[i] = make_pair(at,ct); } sort(a.begin(),a.end()); vector ans(n); int now=0,r=0,g=0,b=0; for(int i=0;i