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

scanf and printf are much more expensive than getchar and putchar.

Posted by hitlion at 2008-08-04 20:57:34 on Problem 2602
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:
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