HBC15881Cards Game题解

凸凸曼凸凸 算法基础篇 43 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
It’s universally acknowledged that there’re innumerable trees in the campus of HUST. People like to play games under the tree, and SWH is exactly fond of one strange card game. In the game player

It’s universally acknowledged that there’re innumerable trees in the campus of HUST. People like to play games under the tree, and SWH is exactly fond of one strange card game. In the game players are given some piles of cards with scores. Two players will take turns to draw a card from one pile and get the score of the card. Each player can choose the pile arbitrarily. However, the strange thing is that the player draws first can only draw a card from the top of one pile, and the player played second from the bottom. The game ends when all piles become empty. Now SWH and his friend LLY is going to play the game and SWH plays first. Both of them want to maximize his own score. Can you tell how many scores they will get finally?

HBC15881Cards Game题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC15881Cards Game题解