#include using namespace std; int main(){ int D,Q,A,B,j=1,a=0,count=0; cin>>D>>Q; int *task=new int[D]; for(int i=0;i>A>>B; for(int k=A;k