Skip to content

Instantly share code, notes, and snippets.

@ArifHosan
Last active March 14, 2018 14:11
Show Gist options
  • Save ArifHosan/2c18dc0131a16a45cffefaf2c026b3df to your computer and use it in GitHub Desktop.
Save ArifHosan/2c18dc0131a16a45cffefaf2c026b3df to your computer and use it in GitHub Desktop.
A default template for CPP.
/**
*
* Arif Hosan
*American International University Bangladesh
* hosan.arif0@gmail.com
*
**/
#include<bits/stdc++.h>
#define PI 2*acos(0.0)
#define SIZE 1e6
#define endl '\n'
int caseno = 1;
using namespace std;
#define D(x) cout << __LINE__ << " " << #x" = " << (x) << endl
#define D2(x,y) cout << __LINE__ << " " << #x" = " << (x) << ", " << #y" = " << (y) << endl
#define CP() printf("Case %d: ",caseno++)
#define R() freopen("in.txt","r",stdin)
#define W() freopen("out.txt","w",stdout)
#define RW R(); W()
#define SFI(_i) scanf("%d",&_i)
#define SFL(_i) scanf("%lld",&_i)
#define SFII(_i,_ii) scanf("%d%d",&_i,&_ii)
#define SFD(_i) scanf("%lf",&_i)
#define SFC(_c) scanf("%c",&_c)
#define PFIL(_i) printf("%d\n",_i)
#define PFI(_i) printf("%d",_i)
#define PFSL(_i) printf("%s\n",_i)
#define PFS(_i) printf("%s",_i)
#define NL printf("\n")
#define SPC printf(" ")
#define ALL(_c) _c.begin(),_c.end()
#define ITE(_a,_b) map<_a,_b>::iterator
#define MEM(_c,_v) memset(_c,_v,sizeof(_c))
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REV(i,a,b) for(i=(a);i>=(b);i--)
#define valid(nx,ny) nx>=0 && nx<30 && ny>=0 && ny<30
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef vector< PII > VII;
template<class T> inline T GCD(T a, T b) { if (a<0) return GCD(-a, b); if (b<0)return GCD(a, -b); while (b) { b ^= a ^= b ^= a %= b; } return a; }
template<class T> inline T LCM(T a, T b) { return a / GCD(a, b)*b; }
inline LL POW(const int &n, const int &k) { LL res = 1; FOR(i, 0, k - 1) res *= n; return res; }
inline int BigMod(int a, int p, int M) { int res = 1, x = a; while (p) { if (p & 1) res = ((LL)res * x) % M; x = ((LL)x * x) % M; p >>= 1; } return res; }
int main() {
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment