Polygon(多边形游戏)

这是一款单人游戏,玩家在一个有N个顶点的多边形中操作,每个顶点标有整数,每条边标有加法或乘法符号。玩家首先移除一条边,然后通过选择边并根据边上的运算符更新顶点标签,直至只剩下一个顶点。程序需计算可能的最高得分并找出所有在首次移除时能达成这一分数的边。

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

Description

 

Polygon is a game for one player that starts on a polygon with N vertices, like the one in Figure 1, where N=4. Each vertex is labelled with an integer and each edge is labelled with either the symbol + (addition) or the symbol * (product). The edges are numbered from 1 to N.

On the first move, one of the edges is removed. Subsequent moves involve the following steps: ?pick an edge E and the two vertices V1 and V2 that are linked by E; and ?replace them by a new vertex, labelled with the result of performing the operation indicated in E on the labels of V1 and V2. The game ends when there are no more edges, and its score is

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值