2018.08.20 有趣的板子

贴一个有趣的板子,考试懒得码了(有可能有错)

#include<bits/stdc++.h>
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef double lf;
typedef long double llf;
typedef std::pair<int,int> pii;
#define xx first
#define yy second

template<typename T> inline T max(T a,T b){return a>b?a:b;}
template<typename T> inline T min(T a,T b){return a<b?a:b;}
template<typename T> inline T abs(T a){return a>0?a:-a;}
template<typename T> inline T gcd(T a,T b){T t;if(a<b){while(a){t=a;a=b%a;b=t;}return b;}else{while(b){t=b;b=a%b;a=t;}return a;}}
template<typename T> inline T sqr(T x){return x*x;}

#define mpr(a,b) std::make_pair(a,b)
#define pb push_back
#define I inline
#define mset(a,b) memset(a,b,sizeof(a))
#define mcpy(a,b) memset(a,b,sizeof(a))

#define f0(i,s,t) for(int i=s,i##end=t;i<i##end;++i)
#define f1(i,s,t) for(int i=s,i##end=t;i<=i##end;++i)
#define f2(i,t,s) for(int i=t;i##end=s;i>=i##end;--i)
#define f3(i,t,s) for(int i=t;i##end=s;i>i##end;--i)

#define gc getchar()
#define pc(x) putchar((x))
#define OP operator
#define RT return *this
#define uc unsigned char
#define rd x=0;uc ch=gc;while((ch<'0'||ch>'9')&&ch!='-')ch=gc;bool f=0;if(ch=='-')ch=gc,f=1;\
x=ch-'0';for(ch=gc;ch>='0'&&ch<='9';ch=gc)x=(x<<1)+(x<<3)+(ch^48);if(f)x=-x
#define wt(S) if(x){if(x<0)pc('-'),x=-x;uc s[(S)],c=0;while(x)s[c++]=x%10+'0',x/=10;while(c--)pc(s[c]);}else pc('0')
I void read(int&x){rd;}
I void write(int x){wt(10);std::cout<<'\n';}
I void read(ll&x){rd;}
I void write(ll x){wt(20);std::cout<<'\n';}
using namespace std;

转载于:https://www.cnblogs.com/ldxcaicai/p/9738359.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值