日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > 互聯網 > UVA - 12163 Addition-Subtraction Game (博弈)

UVA - 12163 Addition-Subtraction Game (博弈)

來源:程序員人生   發布時間:2014-09-08 08:51:20 閱讀次數:2912次

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}

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 国产在线视频一区 | 国产成人精品久久二区二区91 | 国产精品久久久久久久岛一本蜜乳 | 我不卡手机影院 | 天天色官网 | 欧美激情欧美激情在线五月 | 中文字幕视频在线观看 | 麻豆乱码国产一区二区三区 | 玖玖在线 | 亚洲高清不卡一区 | 久久国产精品久久久久久久久久 | 国产成人综合一区二区三区 | 国产成人av在线 | 欧美xxxx黑人又粗又长 | 免费观看成人 | www久久久| 国产精品久久久久一区二区三区共 | 欧产日产国产精品视频 | 精品久久久久一区二区国产 | 亚洲国产精品成人女人久久 | 在线播放一区二区三区 | 希岛あいり中文字幕在线 | 欧美在线视频a | 国产一区二区三区色淫影院 | 99精品欧美一区二区三区综合在线 | 精品成人免费一区二区在线播放 | 久久av中文字幕 | 欧美日韩小视频 | 二区在线观看 | 中文字幕日韩一区二区 | www.玖玖玖 | 亚洲一级在线观看 | 亚洲小视频在线观看 | 午夜精品久久久久久久久久蜜桃 | 男女网站在线观看 | 国产黄色在线网站 | 高清亚洲| 最近中文字幕mv免费高清在线 | 日韩免费观看 | 欧美 亚洲 另类 激情 另类 | 日韩视频免费在线 |