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

Re:超时了,请你们帮帮忙啊,不知道哪里超时?

Posted by MasterLuo at 2008-11-09 12:37:25 on Problem 1953 and last updated at 2008-11-09 12:39:03
In Reply To:超时了,请你们帮帮忙啊,不知道哪里超时? Posted by:dordy at 2008-11-09 11:47:34
这个程序不能这样写吧.
第一:没规定K不能大于45
第二:K大于45时也不能出输出这句话:printf("k值不要大于45,请重新输入:");,不需要你检查数据的合法性.
第三:不要用递归.想想就知道了,用DP.
第四:最好是打表...

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