#include #include using namespace std; int main(){ int T,N; cin>>T; cin>>N; int ary1[N]; for(int i=0;i>ary1[i]; } int ary2[N]; for(int i=0;i>ary2[i]; } int ary3[N][10]; for(int i=0;i=ary1[i]){ a=d; b=i; } int e=ary3[i][ary4[i]]; if(T>=ary1[i] && ans2