Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save raviagarwal7/a23e3a5219e28c11b79a892776c67704 to your computer and use it in GitHub Desktop.
Save raviagarwal7/a23e3a5219e28c11b79a892776c67704 to your computer and use it in GitHub Desktop.
C++Template.cpp
#include<vector>
#include<stack>
#include<set>
#include<map>
#include<queue>
#include<deque>
#include<string>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cassert>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<string>
using namespace std;
#define s(n) scanf("%d",&n)
#define sl(n) scanf("%lld",&n)
#define sf(n) scanf("%lf",&n)
#define ss(n) scanf("%s",n)
#define INF (int)1e9
#define LINF (long long)1e18
#define EPS 1e-9
#define maX(a,b) ((a)>(b)?(a):(b))
#define miN(a,b) ((a)<(b)?(a):(b))
#define abS(x) ((x)<0?-(x):(x))
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,n) FOR(i,0,n)
#define foreach(v,c) for( typeof((c).begin()) v = (c).begin(); v != (c).end(); ++v)
#define mp make_pair
#define FF first
#define SS second
#define tri(a,b,c) mp(a,mp(b,c))
#define XX first
#define YY second.first
#define ZZ second.second
#define pb push_back
#define fill(a,v) memset(a,v,sizeof a)
#define all(x) x.begin(),x.end()
#define SZ(v) ((int)(v.size()))
#define DREP(a) sort(all(a)); a.erase(unique(all(a)),a.end())
#define INDEX(arr,ind) (lower_bound(all(arr),ind)-arr.begin())
#define debug(args...) {dbg,args; cerr<<endl;}
#define dline cerr<<endl
void sc(char &c){
char temp[4]; ss(temp);
c=temp[0];
}
struct debugger
{
template<typename T> debugger& operator , (const T& v)
{
cerr<<v<<" ";
return *this;
}
} dbg;
typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
typedef pair<int,PII> TRI;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<PII> VII;
typedef vector<PLL> VLL;
typedef vector<TRI> VT;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<VII> VVII;
typedef vector<VLL> VVLL;
typedef vector<VT> VVT;
/* Main code begins now */
int testnum;
void preprocess()
{
}
void solve()
{
}
bool input()
{
return true;
}
int main()
{
preprocess();
int T=1;
for(testnum=1;testnum<=T;testnum++)
{
if(!input()) break;
solve();
}
}
@raviagarwal7
Copy link
Author

int n; s(n); -> read next int to n;
similarly
sl(n) -> next long
sf(n) -> next float
ss(n) -> next string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment