My code snippet
#include<bits/stdc++.h>
using namespace std;
/****************************************************************************/
typedef long double lld;
typedef pair<long long int,long long int> pll;
typedef pair<double,double> pdd;
typedef vector<long long int> vll;
typedef vector<vector<long long int> > vvl;
typedef vector<vector<pll> > vvpll;
typedef vector<pll> vpll;
/****************************************************************************/
#define int long long int
#define pi 3.141592653589793238462
#define mod1 1000000007
#define mod2 998244353
#define forn(i,n) for(int i = 0; i < n; i++)
#define rforn(i,n) for(int i = n-1; i >= 0; i--)
#define endl "\n"
#define yes cout << "YES\n"
#define no cout << "NO\n"
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define set_bits __builtin_popcountll
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
/****************************************************************************/
int gcd (int a, int b) { return b ? gcd (b, a % b) : a;}
int lcm(int a, int b){ return (a / gcd(a, b)) * b;}
bool isPowerOfTwo(int n){ if(n==0){return false;} return (ceil(log2(n)) == floor(log2(n)));}
bool isPrime(int n){if (n <= 1){return false;}if (n == 2 || n == 3){return true;}if (n % 2 == 0 || n % 3 == 0){return false;}for (int i = 5; i <= sqrt(n); i = i + 6){if (n % i == 0 || n % (i + 2) == 0){return false;}}return true;}
void addEdge(vll adj[],int u,int v){adj[v].pb(u);adj[u].pb(v);}
bool containsKey(int key,unordered_map<auto, auto> m){return (m.find(key)!=m.end());}
void addEdgeDirected(vll adj[],int u,int v){adj[u].pb(v);}
struct Node {int val;Node* left;Node* right;Node (int key) {val = key;left = NULL, right = NULL;}};
/****************************************************************************/
void solve();
void solve() {
}
/****************************************************************************/
int32_t main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("error.txt", "w", stderr);
freopen("output.txt", "w", stdout);
#endif
int t=1;
cin>>t;
while(t--)
{
solve();
cout<<"\n";
}
cerr<<"time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl;
return 0;
}
Comments
Post a Comment