加了几个常用宏,OI改成了模板式
1 #include<iostream> 2 #include<cstdio> 3 #include<cmath> 4 #include<algorithm> 5 #include<stack> 6 #include<queue> 7 #include<cstring> 8 #define pau putchar(' ') 9 #define ent putchar(' ') 10 #define mse(a,b) memset(a,b,sizeof(a)) 11 #define ren(x) for(ted*e=fch[x];e;e=e->nxt) 12 #define rep(i,s,t) for(int i=s,__=t;i<=__;i++) 13 #define dwn(i,s,t) for(int i=s,__=t;i>=__;i--) 14 using namespace std; 15 inline int read(){ 16 int x=0;bool sig=true;char ch=getchar(); 17 for(;!isdigit(ch);ch=getchar())if(ch=='-')sig=false; 18 for(;isdigit(ch);ch=getchar())x=10*x+ch-'0';return sig?x:-x; 19 } 20 template<class T>inline void write(T x){ 21 if(x==0){putchar('0');return;}if(x<0)putchar('-'),x=-x; 22 int len=0;static T buf[20];while(x)buf[len++]=x%10,x/=10; 23 for(int i=len-1;i>=0;i--)putchar(buf[i]+'0');return; 24 } 25 int main(){ 26 return 0; 27 }