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

未见有垃圾数据

Posted by rocku at 2009-01-08 12:37:47 on Problem 2328
关键是要把逻辑处理好,
这段是关键:
if(strcmp(str,"high") == 0 && n <= high) high = n-1;
else if(strcmp(str,"low") == 0 && n >= low) low = n+1;
n是猜的数,关键的地方在于n <= high 和 n >= low。。。。
我也是WA了几次,供后人参考。。。

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