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 mostleg at 2005-04-24 16:43:46 on Problem 1736
In Reply To:请具体说一下,大家讨论一下 Posted by:hawk at 2005-04-24 14:00:27
恩,首先,那个WA是我自己的错误。现在已经过了。

这道题数据大概比较弱,我说的那种“错误的方法”是这样的:
在求最小建筑的时候,对于每个高度h,设正向视图和侧面视图当中高度大于等于h的“塔”的数量分别为num1和num2,取num1和num2中较大的就是最小建筑在h高度需要的积木数量。对各高度求和即可。
这种算法对于这个数据就是错的:
4 4
3 3 2 2
3 3 1 1
答案是12 28
这种算法输出10 28
可是竟然AC了

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