0% found this document useful (0 votes)
7 views2 pages

Code Example by Shinjan Chaturvedi

This document contains C++ code that sets up a basic program structure including necessary libraries and type definitions. It defines several utility functions for mathematical operations and modular arithmetic. The main function reads an integer input and calls a solve function that outputs 'Hello, World!'.

Uploaded by

pythonix.xyz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Code Example by Shinjan Chaturvedi

This document contains C++ code that sets up a basic program structure including necessary libraries and type definitions. It defines several utility functions for mathematical operations and modular arithmetic. The main function reads an integer input and calls a solve function that outputs 'Hello, World!'.

Uploaded by

pythonix.xyz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#include <iostream>

#include <string.h>
#include <cmath>
#include <vector>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <bit>
#include <numeric>
#include <set>
#include <ios>
#include <queue>
#include <iomanip>
#include <stack>
using namespace std;

typedef long long ll;


typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef string str;

#define ios() ios::sync_with_stdio(0); [Link](0); [Link](0);


#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define eb emplace_back
#define ff first
#define ss second
#define sz(x) int((x).size())

#define FOR(i,a,b) for(int i = a; i < b; ++i)


#define ROF(i,a,b) for(int i = a; i >= b; --i)

#define print(x) for (auto& i : x) cout << i << " "; cout << '\n';

const int MOD = 1e9 + 7;


const int MOD2 = 998244353;
const int INF = 1e9;
const ll LINF = 1e18;
const int N = 2e5 + 5;
const int max_pow = 2147483647;

ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }


ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll mod_add(ll a, ll b, ll m = MOD) { return (a + b) % m; }
ll mod_sub(ll a, ll b, ll m = MOD) { return (a - b + m) % m; }
ll mod_mul(ll a, ll b, ll m = MOD) { return (a * b) % m; }
ll mod_pow(ll a, ll b, ll m = MOD) {
ll res = 1; a %= m;
while (b) {
if (b & 1) res = res * a % m;
a = a * a % m; b >>= 1;
}
return res;
}
void solve() {
cout << "Hello, World!" << endl;
}

int main() {
ios();
int t = 1;
cin >> t;
while (t --) {
solve();
}
}

You might also like