#include #include #include using namespace std; #define ll unsigned long long int main() { int q; /* for (q = 1;; q++){ int cnt = 0; cout << "q :" << q << endl; for (int i = 0; i < q; i++){ for (int j = 0; j < q - i; j++){ cnt++; } cout << "j end :" << cnt << endl; } cout << "i end :" << cnt << endl; } */ cin >> q; vector> bv; bv.push_back(vector(1501 + 1, 1)); for (int j = 0; j < 1500; j++){ vector v(1, 1); for (int k = 0; k < 1501; k++){ v.push_back(v[k] + bv[j][k + 1]); } bv.push_back(v); } for (int i = 0; i < q; i++){ ll d, x, t; cin >> d >> x >> t; if (bv[d - 1][x] <= t){ cout << "AC" << endl; } else{ cout << "ZETUBOU" << endl; } } return 0; }