Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
欢迎参加IJCAI 2020麻将智能体竞赛,大奖等你拿!Welcome to IJCAI 2020 Mahjong AI competition with amazing prizes! | 北京大学《ACM/ICPC大学生程序设计竞赛训练》暑期课面向全球招生!

【太折翼了】因为读入而TLE、有谁比楼主更折翼?

Posted by adoo23 at 2012-04-20 23:08:19 on Problem 1459
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator