码迷,mamicode.com
首页 > 其他好文 > 详细

oi模板

时间:2016-07-11 23:57:39      阅读:443      评论:0      收藏:0      [点我收藏+]

标签:

// Copyright (c) 2016 jszyxw. All rights reversed.

#include <set>
#include <map>
#include <ctime>
#include <cmath>
#include <cctype>
#include <cstdio>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>

#define X first
#define Y second
#define LL long long
#define MP make_pair
#define pii pair<int, int>
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)
#define REP(i, x, y) for (int i = (x), _ = (y); i <= _; ++ i)
#define rep(i, x, y) for (int i = (y), _ = (x); i >= _; -- i)
#define REPedge(i, u) for (int i = st[u]; i; i = e[i].next)

#ifdef __linux__
#define getchar getchar_unlocked
#define putchar putchar_unlocked
#endif

int ___;
const LL OO = 1e18;
const int oo = 2e9;
const int MO = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 1e5 + 5;
const int MAXM = MAXN * 10;
const int End_Time = CLOCKS_PER_SEC * 0.98;

template <class T> inline bool Chkmin(T &x, T y) { return x > y ? x = y, true : false; }
template <class T> inline bool Chkmax(T &x, T y) { return x < y ? x = y, true : false; }

template <class T> inline T read(T &x) 
{
	static int f;
	static char c; 
	for (f = 1; !isdigit(c = getchar()); ) if (c == ‘-‘) f = -f;
	for (x = 0; isdigit(c); c = getchar()) x = x * 10 + c - 48;
	return x *= f;
}
template <class T> inline void write(T x, char P = 0) 
{
	static char s[25];
	static int top = 0; 
	if (x < 0) putchar(‘-‘), x = -x;
	do s[++top] = x % 10 + 48; while (x /= 10);
	do putchar(s[top]); while (-- top);
	if (P) putchar(P);
}
template <class T> inline T qpow(T x, LL n) 
{
	T ans = T(1);
	while (n) {
		if (n & 1) ans = ans * x % MO;
		x = x * x % MO;
		n >>= 1;
	}
	return ans;
}

using namespace std;

// EOT


inline void Init()
{
}

inline void Solve()
{
}

// BOT

string Program_Name = "t";
string Iput = Program_Name + ".in";
string Oput = Program_Name + ".out";

int main() 
{
	if (fopen(Iput.c_str(), "r") != NULL) {
		freopen(Iput.c_str(), "r", stdin);
		freopen(Oput.c_str(), "w", stdout);
	}

	Init(); 
	Solve();

	return 0;
}

  

oi模板

标签:

原文地址:http://www.cnblogs.com/jszyxw/p/5661911.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!