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

注意N=0的情况 if(n) printf("Number of doors = %ld\n",ans+1) ; else printf("Number of doors = 1\n") ;我开始注意到了但是else语句只输出了1,忘记了打字符串。。

Posted by IceKingdom at 2009-04-28 23:47:10 on Problem 1066 and last updated at 2009-04-28 23:49:42
枚举边上的所有点形成线段的中点,与给定的点连线段,这条线段与所有题目中输入的线段的交点数之和+1就是答案。
另 边上一共有k+1的点要去判断。。

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