#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x=1LL<<60) C_[i][j]=1LL<<60; } } if(P_<0 || P_>N_ || Q_<0 || Q_>P_) return 0; return C_[P_][Q_]; } ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}; ll mul(ll a,ll b) { if(a*b>Q; FOR(i,Q) { cin>>D>>X>>T; if(hcomb(D,X)<=T) cout<<"AC"<