Preview:
#include <bits/stdc++.h>
using namespace std;

int mod = 1e9 + 7;
const int MAX = 1e5 + 1;

#define ll long long
#define ull unsigned long long
#define int64 long long int
#define vi vector<int>
#define pii pair<int, int>
#define ppi pair<pii>
#define all(v) v.begin(), v.end()
#define ff first
#define ss second
#define eb emplace_back
#define sz(x) (int(x.size()))
#define mset(dp, x) memset(dp, x, sizeof(dp))

int dir[5] = {0, 1, 0, -1, 0};
int dirI[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dirJ[8] = {0, -1, -1, -1, 0, 1, 1, 1};

ll fact[MAX] = {1};

ll add(ll a, ll b)
{
    return (a % mod + b % mod) % mod;
}

ll sub(ll a, ll b)
{
    return (a % mod - b % mod + mod) % mod;
}

ll mul(ll a, ll b)
{
    return ((a % mod) * (b % mod)) % mod;
}

ll exp(ll a, ll b)
{
    ll ans = 1;
    while (b)
    {
        if (b & 1)
            ans = (ans * a) % mod;
        a = (a * a) % mod;
        b >>= 1;
    }
    return ans;
}

ll inv(ll b)
{
    return exp(b, mod - 2) % mod;
}

ll division(ll a, ll b)
{
    return ((a % mod) * (inv(b) % mod)) % mod;
}

ll nCr(ll n, ll r)
{
    if (r > n)
        return 0;
    return division(fact[n], mul(fact[r], fact[n - r]));
}

ll nPr(ll n, ll r)
{
    if (r > n)
        return 0;
    return division(fact[n], fact[n - r]);
}

ll gcd(ll a, ll b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

ll lcm(ll a, ll b)
{
    return (a * b) / gcd(a, b);
}

void pre(int _mod = mod)
{
    mod = _mod;
    fact[0] = 1;
    for (int i = 1; i < MAX; i++)
    {
        fact[i] = mul(fact[i - 1], i);
    }
}

void solve() {
    cout << "write code here" << "\n";
}

int main() {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif

	int tt = 1;
	cin >> tt;
	while (tt--) {
		solve();
	}
	return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter