看不懂了 高手来翻译.This assignment involves two related games. In each game the two players alternatelyname dates. The winner is the player who names 31st December and the starting dateis 1st January.Each of the two games use a different ru
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/26 02:46:17
看不懂了 高手来翻译.This assignment involves two related games. In each game the two players alternatelyname dates. The winner is the player who names 31st December and the starting dateis 1st January.Each of the two games use a different ru
看不懂了 高手来翻译.
This assignment involves two related games. In each game the two players alternately
name dates. The winner is the player who names 31st December and the starting date
is 1st January.
Each of the two games use a different rule for the dates the player is allowed to name.
For each game.
1. Devise a winning strategy, stating which player should win. State also if it
depends on whether the year is a leap year or not.
2. Write a pseudocode algorithm for optimum play.
The games are.
a. (Easy) A player can name the 1st of the next month or increase the day of
the month by an arbitrary amount. (For example, the first player begins by
naming 1st February or any date in January other than the 1st).
b. (Harder) A player can name the first of the next month or the next day of
the current month. (For example, the first player begins by naming 1st
February or 2nd January).
Hint: Look for patterns. Begin by looking at December dates.
看不懂了 高手来翻译.This assignment involves two related games. In each game the two players alternatelyname dates. The winner is the player who names 31st December and the starting dateis 1st January.Each of the two games use a different ru
这次作业包括两个相关的游戏,在每个游戏中,两名参与者轮流命名日期,获胜者是命名了12月31日的人,开始日期是1月1日
每个游戏对于玩家被允许命名的日期用的是不同的规则
对于每个游戏:
1.设计一个获胜的策略,陈述哪一个人会赢.并且陈述是否取决于闰年或平年
2.为最佳玩法写一个伪代码算法
这两个游戏是:
a简单的:玩家可以命名下一个月的第一天或者在同月中增加任意天数
(例如,第一个玩家开始时命名二月一日或者一月除了一日之外的任意一天)
b困难的:玩家可以命名下一个月的第一天或者当月的第二天
(例如,第一个玩家开始时命名二月一日或者一月二日)
提示:注意样式,从观察十二月的日期开始