1. 程式人生 > >計算機學院大學生程式設計競賽(2015’12)Pick Game

計算機學院大學生程式設計競賽(2015’12)Pick Game

This is a pick game.
On a n*m matrix, each gird has a value. The player could only choose the gird that is adjacent to at least two empty girds (A grid outside the matrix also regard as empty). Adjacent means two girds share a common edge. If one play chooses one gird, he will get the value and the gird will be empty. They play in turn.

One day, WKC plays this game with ZJS. 
Both of them are clever students, so they will choose the best strategy. 
WKC plays first, and he wants to know the maximal value he could get.