我的模版肯定不适合所有人(废话)
写起来自己真正舒服最重要
cmath库的函数我能手写的一般手写所以就写成了函数模版
typedef了一些东西省时间
vector的动态申请空间这点想好好利用于是define了
stack对于给图论题做栈非常方便
然后就是平常常用的一些库,比如万恶的STL哈哈
当然,模版会不断更新的
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <climits>
#include <cstring>
#include <utility>
#include <vector>
#include <string>
#include <cstdio>
#include <bitset>
#include <ctime>
#include <cmath>
#include <stack>
#include <list>
#include <set>
#include <map>
using namespace std;
#define sci stack <int>
#define vci vector <int>
#define vcs vector <string>
#define vcd vector <double>
#define vci64 vector <long long>
#define seti set <int>
#define mseti multiset <int>
const int maxn = 100000 + 5;
const int maxm = 100000 + 5;
typedef unsigned int uint;
typedef long long int64;
typedef unsigned long long uint64;
template <class T> inline T Sqr(const T & x) { return x * x; }
template <class T> inline T Abs(const T & x) { return x > 0 ? x : -x; }
template <class T> inline T Min(const T & a, const T & b) { return a < b ? a : b; }
template <class T> inline T Max(const T & a, const T & b) { return a > b ? a : b; }
template <class T> inline T Ksm(const T & a, const T & b, const T & m) { T _ = 1; for (; b; b >>= 1, a = a * a % m) (b & 1) ? _ = _ * a % m : 0; return _ % m; }
template <class T> inline void Swap(T & a, T & b) { T _; _ = a; a = b; b = _; }
int getint()
{
char ch = getchar(); int result = 0, res = 1;
for (; '0' > ch || ch > '9'; ch = getchar()) ch == '-' ? res = -1 : 0;
for (; '0' <= ch && ch <= '9'; result = result * 10 + ch - '0', ch = getchar());
return result * res;
}
int main()
{
#ifndef ONLINE_JUDGE
freopen(".in", "r", stdin);
freopen(".out", "w", stdout);
#endif
return 0;
}
还有,以后代码发ideone