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:交了12次了!终于过了!

Posted by 0908060064 at 2011-12-06 22:17:18 on Problem 3278
In Reply To:交了12次了!终于过了! Posted by:ecjtuQX at 2008-10-07 23:27:08
> 算法没什么问题!
> 在写代码的时候犯了个错误~~
> 我将top++放在了if{}的外面,
> 第12的时候终于发现了错误!
> 我的解题报告在:http://hi.baidu.com/ecjtuqx/blog/item/0158e359d87cbc87810a18c1.html


你这个是错的,给你两组测试数据就很明了
5435  53254
ans=1226(你程序的结果)

5436 53254
ans=1325

两个就n相差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