int
int Scan() { int res = 0, ch, flag = 0; if((ch = getchar()) == '-') //判断正负 flag = 1; else if(ch >= '0' && ch <= '9') //得到完整的数 res = ch - '0'; while((ch = getchar()) >= '0' && ch <= '9' ) res = res * 10 + ch - '0'; return flag ? -res : res; }
double
int re(double *ret)
{ int sgn; double bit=0.1; char c; c=getchar(); if(c==EOF)return true; while(c!='-'&&c!='.'&&(c<'0'||c>'9'))c=getchar(); sgn=(c=='-')?-1:1; *ret=(c=='-')?0:(c-'0'); while((c=getchar())>='0'&&c<='9')*ret=*ret*10+(c-'0'); if(c==' '||c==' '){*ret*=sgn;return true;} while((c=getchar())>='0'&&c<='9')*ret+=(c-'0')*bit,bit/=10; *ret*=sgn; return false; }
zifu