zoj 2852 Deck of Cards扑克牌(三维dp)

这是一篇关于ZOJ 2852题目的博客,讨论了一个名为21-point的小型扑克牌游戏。游戏的目标是通过累积卡牌点数达到21点。博客解释了简化后的游戏规则,包括标准的54张卡牌及其点数,3个可放置卡牌的槽位,以及如何计算最大收益。博主指出,游戏结束条件和使用万能牌(Joker)的策略对结果有显著影响,并提供了样例输入和输出来说明问题的复杂性和顺序敏感性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

21-point is a small game played with cards. Its aim is to accumulate the points on the cards so as to get 21 points. This game also appears on some cell phones.

To simplify the problem, let's have some assumptions.

  • The game is played with a standard deck of 54 cards, namely A, 2, 3, 4, 5, 6 , 7, 8, 9, 10 (denoted as T), J, Q, K, Joker (denoted as F. However, the number of cards of a game may be up to 100.

  • In this game, an Ace values 1 point, the face cards (K, Q and J) value 10 points each and the remaining cards are valued by their numerical values. The joker is a bit different, which will be mentioned later.

  • There are 3 slots on the table, namely 1x, 2x, 3x.

  • A slot is available if the total points of the cards on that slot do not exceed 21.

  • The cards on a slot will be taken away as soon as the total points of cards are 21.

  • You are asked to put the cards on the table in the given order.

  • The cards can be put on a slot only if the slot is available.

  • A joker values as large as possible. In another word, a slot's total value becomes 21 immediately after placing a joker into it.

  • The game ends if no slot is available or the cards are all used.

  • You can get 50 dollars if you succee
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值