Codeforces 549C. The Game Of Parity 博弈

There arencities in Westeros. Thei-th city is inhabited byaipeople. Daenerys and Stannis play the following game: in one single move, a player chooses a certain town and burns it to the ground. Thus all its residents, sadly, die. Stannis starts the game. The game ends when Westeros has exactlykcities left.

The prophecy says that if the total number of surviving residents is even, then Daenerys wins: Stannis gets beheaded, and Daenerys rises on the Iron Throne. If the total number of surviving residents is odd, Stannis wins and everything goes in the completely opposite way.

Lord Petyr Baelish wants to know which candidates to the throne he should support, and therefore he wonders, which one of them has a winning strategy. Answer to this question of Lord Baelish and maybe you will become the next Lord of Harrenholl.

,无神的瞳孔,我迫切想逃离这周遭被钢筋混凝土堆架的城市,

Codeforces 549C. The Game Of Parity 博弈

相关文章:

你感兴趣的文章:

标签云: