Created
April 6, 2014 09:41
-
-
Save praveendhinwa/10003709 to your computer and use it in GitHub Desktop.
final template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Inspired from Psyho, macros of the template are taken from Psyho's template */ | |
| #include<bits/stdc++.h> | |
| using namespace std; | |
| #define REP(i,n) for(int (i)=(0);(i)<(n);(i)++) | |
| #define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++) | |
| #define FOREACH(it,c) for(auto it=(c).begin();it!=(c).end();++it) | |
| #define PB push_back | |
| #define S size() | |
| #define X first | |
| #define Y second | |
| #define VC vector | |
| #define DB(a) cerr << #a << ": " << (a) << endl; | |
| #define VI VC < int > | |
| #define VVI VC < VI > | |
| #define PII pair <int, int> | |
| #define VPII VC < PII > | |
| #define VD VC < double > | |
| #define VVD VC < VD > | |
| #define VS VC < string > | |
| #define LL long long | |
| #define ULL unsigned long long | |
| #define LD long double | |
| #define FILL(a,v) memset(a,v,sizeof(a)) | |
| template<class T> void print(vector< T > v) {cerr << "[";if (v.S) cerr << v[0];FOR(i, 1, v.S) cerr << ", " << v[i];cerr << "]" << endl;} | |
| template<class T> string i2s(T x) {ostringstream o; o << x; return o.str(); } | |
| VS splt(string s, char c = ' ') {VS all; int p = 0, np; while (np = s.find(c, p), np >= 0) {if (np != p) all.PB(s.substr(p, np - p)); p = np + 1;} | |
| if (p < s.S) all.PB(s.substr(p)); return all;} | |
| /* main code is here */ | |
| int main() { | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment