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 |
scanf and printf are much more expensive than getchar and putchar.Without doubt, scanf and printf are expensive functions. I recognize that until getting TLE of this problem. Here are the comparision: #1: scanf + printf TLE; #2: getchar + printf 925ms; #3: getchar + putchar 125ms; You see, the difference is amazing! Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator