Last active
December 27, 2015 03:39
-
-
Save ZikiSoy/7261399 to your computer and use it in GitHub Desktop.
C++ header file for algorithm contest
This file contains 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
/*==================================================*\ | |
| Author: ziki | |
| Created Time: | |
| File Name: | |
| Description: | |
\*==================================================*/ | |
#include <vector> | |
#include <list> | |
#include <map> | |
#include <set> | |
#include <deque> | |
#include <queue> | |
#include <stack> | |
#include <algorithm> | |
#include <functional> | |
#include <utility> | |
#include <sstream> | |
#include <iostream> | |
#include <cstdio> | |
#include <cmath> | |
#include <cstdlib> | |
#include <cctype> | |
#include <string> | |
#include <cstring> | |
#include <string.h> | |
using namespace std; | |
using namespace rel_ops; | |
typedef long long int64; | |
typedef unsigned long long uint64; | |
const double pi=acos(-1.0); | |
const double eps=1e-11; | |
const int inf=0x7FFFFFFF; | |
template<class T> inline bool checkmin(T &a,T b){return b<a?a=b,1:0;} | |
template<class T> inline bool checkmax(T &a,T b){return b>a?a=b,1:0;} | |
template<class T> inline T sqr(T x){return x*x;} | |
typedef pair<int,int> PII; | |
typedef vector<int> VI; | |
typedef vector<PII> VII; | |
#define MP(A,B) make_pair(A,B) | |
#define PB(X) push_back(X) | |
#define mem(a,b) memset(a, b, sizeof(a)) | |
#define clr(a) memset(a, 0, sizeof(a)) | |
#define rep(i,n) for(int i=0; i<n; i++) | |
#define repit(i,v) for(typeof(v.begin()) i=v.begin(); i!=v.end(); i++) | |
#define iter(v) typeof(v.begin()) | |
#define ff first | |
#define ss second | |
#ifdef LOCAL | |
#define dbg(args...) printf(args); //##__VA_ARGS__ | |
#define dout cout | |
#define out(x) (cout<<#x<<": "<<x<<endl) | |
template<class T>void show(T a, int n){for(int i=0; i<n; ++i) cout<<a[i]<<' '; cout<<endl;} | |
template<class T>void show(T a, int r, int l){for(int i=0; i<r; ++i)show(a[i],l);cout<<endl;} | |
#else | |
#define dbg(...) | |
#define dout if(true);else cout | |
#define out(...) | |
#define show(...) | |
#endif |
This file contains 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
#line $NEXTLINENUMBER$ "$FILENAME$" | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <deque> | |
#include <queue> | |
#include <stack> | |
#include <algorithm> | |
#include <functional> | |
#include <utility> | |
#include <sstream> | |
#include <iostream> | |
#include <cstdio> | |
#include <cmath> | |
#include <cctype> | |
#include <cstring> | |
using namespace std; | |
$BEGINCUT$ | |
#ifdef LOCAL | |
#define dbg(args...) printf(args); //##__VA_ARGS__ | |
#define dout cout | |
#define out(x) (cout<<#x<<": "<<x<<endl) | |
template<class T>void show(T a, int n){for(int i=0; i<n; ++i) cout<<a[i]<<' '; cout<<endl;} | |
template<class T>void show(T a, int r, int l){for(int i=0; i<r; ++i)show(a[i],l);cout<<endl;} | |
#else | |
$ENDCUT$ | |
#define dbg(...) | |
#define dout if(true);else cout | |
#define out(...) | |
#define show(...) | |
$BEGINCUT$ | |
#endif | |
$ENDCUT$ | |
typedef long long ll; | |
const double eps=1e-11; | |
const int inf=0x7FFFFFFF; | |
template<class T> inline bool checkmin(T &a,T b){return b<a?a=b,1:0;} | |
template<class T> inline bool checkmax(T &a,T b){return b>a?a=b,1:0;} | |
#define rep(i, n) for(int i=0; i<int(n); i++) | |
class $CLASSNAME$ { | |
public: | |
$RC$ $METHODNAME$($METHODPARMS$) { | |
} | |
$TESTCODE$ | |
}; | |
// BEGIN CUT HERE | |
int main() | |
{ | |
$CLASSNAME$ ___test; | |
___test.run_test(-1); | |
return 0; | |
} | |
// END CUT HERE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment