#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include // cout, endl, cin #include // string, to_string, stoi #include // vector #include // min, max, swap, sort, reverse, lower_bound, upper_bound #include // pair, make_pair #include // tuple, make_tuple #include // int64_t, int*_t #include // printf #include // map #include // queue, priority_queue #include // set #include // stack #include // deque #include // unordered_map #include // unordered_set #include // bitset #include // isupper, islower, isdigit, toupper, tolower #include #include #include using namespace std; using namespace atcoder; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++) typedef long long ll; typedef unsigned long long ull; const ll inf=8e18; using graph = vector > ; using P= pair; using vi=vector; using vvi=vector; using vll=vector; using vvll=vector; using vp=vector

; using vpp=vector; using vd=vector; using vvd =vector; //string T="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //string S="abcdefghijklmnopqrstuvwxyz"; //g++ main.cpp -std=c++17 -I . //cout < void debug(T s){cout << "test" << " " << s << endl;} ll pow_pow(ll x,ll n,ll mod){ if(n==0) return 1; x%=mod; ll res=pow_pow(x*x%mod,n/2,mod); if(n&1)res=res*x%mod; return res; } ll gcd(ll x,ll y){ if(y==0)return x; return gcd(y,x%y); } ll lcm(ll x,ll y){ return ll(x/gcd(x,y))*y; } template bool chmin(T& a, T b) { if (a > b) { a = b; return true; } else return false; } template bool chmax(T& a, T b) { if (a < b) { a = b; return true; } else return false; } ll sqrt_(ll x) { ll l = 0, r = ll(3e9)+1; while (l+1=0 && y>=0 && x; using vve=vector; int MOD = 1e9 + 7; vll fact, fact_inv, inv; void init_nCk(int n) { fact.resize(n+1); fact_inv.resize(n+1); inv.resize(n+1); fact[0] = fact[1] = 1; fact_inv[0] = fact_inv[1] = 1; inv[1] = 1; for (int i = 2; i<=n; i++) { fact[i] = fact[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; fact_inv[i] = fact_inv[i - 1] * inv[i] % MOD; } } ll nCk(int n, int k) { assert(!(n < k)); assert(!(n < 0 || k < 0)); return fact[n] * (fact_inv[k] * fact_inv[n - k] % MOD) % MOD; } void solve(int test){ ll l,r,m; cin >> l >> r >> m; init_nCk(m); ll now=1; for(int i=1; i> t; rep(test,t)solve(test); }