func_code_string: #include <bits/stdc++.h>   using namespace std;   #define fastIO ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);   #define FF first   #define SS second   #define pb push_back   #define sz(x) (int)x.size()   #define oo 1e9   #define eps 1e-9   #define PI acos(-1.0)   #define lb lower_bound   #define ub upper_bound   #define all(a) (a).begin(), (a).end()   #define log2i(x) (64 - __builtin_clzll(1ll*(x)) - 1)   #define INF 0x7f7f7f7f   typedef long long ll;   typedef unsigned long long ull;   typedef pair<int, int> ii;   typedef pair<ii, ii> Li;   const int N = 2e5+7, M=100+7;   const int MOD = 1e9+7;   const int base=30;      int n, m, k, t;      int fac[N]{1}, invf[N]{1};      int add(int a, int b) {       a+=b; if(a>MOD) a-=MOD;       return a;   }   int mul(int a, int b) {return (1LL*a*b)%MOD;}   void gcd(int a, int b, int &x, int &y) {       if(!b) {x=1, y=0; return;}       int tx, ty; gcd(b, a%b, tx, ty);       x=ty, y=tx-(a/b)*ty;   }   int inv(int a) {       int x, y; gcd(a, MOD, x, y);       return (x%MOD+MOD)%MOD;   }   int nCk(int n, int k) {       if(n<k||k<0) return 0;       return mul(fac[n], mul(invf[n-k], invf[k]));   }      signed main() {       //freopen( test.inp ,  r , stdin);       //freopen( test.out ,  w , stdout);       //fastIO;       scanf( %d , &t);       for(int i=1;i<N;i++) {           fac[i]=mul(fac[i-1], i);           invf[i]=inv(fac[i]);       }       while(t--) {           scanf( %d%d%d , &n, &m, &k);           int r=min(1-m, k-n), ans=nCk(n, n/2);           if(n&1) ans=mul(ans, 2); ans=mul(ans, r);           for(int pos, neg, i=r+1; i<=r+n;i++) {               pos=max(0, m+i-1), neg=max(0, n-k+i);               int tmp=n-pos-neg;               if(tmp<0) break;               ans=add(ans, nCk(tmp, n/2-pos));               if(n&1) ans=add(ans, nCk(tmp, n/2-neg));           }           printf( %d n , ans);       }       return 0;   }   /* stuff you should look for       - int overflow, array   bounds       - special cases (n=1?)       - do smth instead of do nothing and stay organized       - WRITE STUFF DOWN       - DONT JUST STICK ON ONE APPROACH   */   