读入优化输出优化

LL READ(){
      LL f=1,x=0;char ch=getchar();
      while ((ch<'0')||(ch>'9')){if (ch=='-') f*=-1;ch=getchar();}
      while ((ch>='0')&&(ch<='9')) x*=10,x+=ch-'0',ch=getchar();
      return(f*x);
  }
  
  void WRITE(LL k){
      LL num=0;
      if (k<0) putchar(45),k=-k;
    while (k) st[++num]=k%10,k/=10;
      if (num!=0)while (num) putchar(st[num--]+48);else putchar(48);
  }

 

posted @ 2016-06-12 16:29  z1j1n1  阅读(234)  评论(0编辑  收藏  举报