| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
关于1083 (推桌子)的结果网上看了很多解题报告说是用贪心算法能解。试了一下也能AC,但本人有个疑问,就是对如下几组数据结果其实是不对的。 数据1: 1 8 13 295 52 262 65 199 116 268 165 390 195 352 200 284 295 302 贪心算法结果为70. 网上很多解法结果都是70. 但是最优解貌似是60,方法如下。 第一次: 13 -> 295 第二次: 52 -> 262 第三次: 65->199, 200 -> 284, 295-> 302 第四次: 116->268 第五次: 165->390 第六次: 195->352 感觉题库judge的时候也是用贪心算出来的结果。很多数据都不是最优解。 不知道是不是我漏掉什么地方,各位大神请指点。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator