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
欢迎参加IJCAI 2020麻将智能体竞赛,大奖等你拿!Welcome to IJCAI 2020 Mahjong AI competition with amazing prizes!

关于这个题,小妹有一个问题求教

Posted by YT201756501121 at 2020-02-13 15:04:07 on Problem 3253
小妹不才,问的问题对于巨巨们来说可能太简单:
为什么这个贪心的思路不能是每次减去最大长度的木块?
举个例子:
ans=0 //记录结果,花费代价
ans+= 21    21-8=13
ans+=13     13-8=5
然后结果就是34了。。。
一直不明白为什么不能这样做。
谢谢啦。

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