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

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

被折叠的 条评论
为什么被折叠?



