Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
【太折翼了】因为读入而TLE、有谁比楼主更折翼?int rd(){ char c; for(;!(('0'<=c)&&(c<='9'));scanf("%c",&c)); int k=0; do{ k=k*10+c-'0'; scanf("%c",&c); }while(('0'<=c)&&(c<='9')); return k; } 大家看这个折翼的读入……这就是想太多的结果…… TLE了无数次有木有…… 数组太小啥的问题全都想过了都没用有木有! 自从用了大神推荐的scanf("%s",temp);sscanf(temp,"(%d,%d)%d",&u,&v,&z)之后,腰不酸了、腿不疼了、吃嘛嘛香 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator