多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內(nèi)最全IT社區(qū)平臺 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2
您當前位置:首頁 > 互聯(lián)網(wǎng) > UVA - 12163 Addition-Subtraction Game (博弈)

UVA - 12163 Addition-Subtraction Game (博弈)

來源:程序員人生   發(fā)布時間:2014-09-08 08:51:20 閱讀次數(shù):2911次

Description

Download as PDF

 

You and your friend are playing a 2 player game. The game is played in a graph ofV vertices. The vertices are numbered from0 toV-1. The graph has some directed edges. But the graph does not contain any cycles or loops. The rule of the game is as follows.

1.      Initially vertex i has a positive value valuei

2.      Both players make their moves by turns. In his turn the player chooses a vertex with the following properties.

?         The value of the vertex is strictly positive.

?         The vertex has one or more outgoing edges.

If there is no such vertex the player loses and the game terminates.

3.      If the player can select a vertex the player will decrease the value of the selected vertexi by1. Then from the set of vertices which have an incoming edge from vertexi, the player will selectKi (this value will be given as input) vertices and increase the value of those vertices by1.  Among these selectedKi vertices there can be duplicated vertices. And if a vertex is selectedn times its value will be increased by1 every time. Or in another word its value will be increased byn. For example if theKi=6 and the selected vertex set is{2,2,2,3,3,5} thenvalue2 will be increased by3, value3 will be increased by 2 and value5 will be increased by1.

Now consider the graph on the right.

 

Let the values of K be {2,1,3,2}.

 

Now the value set {0,0,0,5} is a losing terminating position because the player cannot select any vertex which have outgoing edges and positive values.

For the value set {3,4,5,6} the current player can go to the following value states by1 move.

?         {2,5,6,6}

生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 国产啪视频1000部免费视频 | 日韩欧美第一页 | 欧美性xxxx禁忌 | 免费视频爱爱 | 99视频精品免视3 | 日韩精品一区二区三区视频 | 色博影院 | 又大又硬又黄又刺激的免费视频 | 2017自拍偷拍| 激情春色网 | 曰本人一级毛片免费完整视频 | 午夜网站免费版在线观看 | 另类小说亚洲 | 永久免费精品视频 | 一级一级特黄女人精品毛片视频 | www.av免费| 国产欧美日韩高清专区手机版 | 亚洲免费黄色 | 国产福利视频一区二区三区四区 | 久久精品国产一区 | 欧美色图偷窥自拍 | 国产福利一区二区精品视频 | 欧美日韩大尺码免费专区 | 成人在线一区二区 | 一本毛片 | xxx日本com | 亚洲精品国自产拍在线观看 | 美国一级免费毛片 | 嫩草影院在线观看未满十八 | 欧美另类 videos黑人极品 | 免费在线观看黄色的网站 | 羞羞免费网页登界面入口 | 偷拍自拍校园春色 | 自拍偷拍欧美图片 | 国产精品成人扳一级aa毛片 | 欧美亚洲精品在线 | 1000部精品久久久久久久久 | 黑人又大又粗又长又深受不了 | 成人国产精品 | 欧美国产一区二区 | 中文字幕乱码二三区免费 |