HBC15414AStringGame题解

2拍不死你 算法基础篇 50 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
Recently Alice and Bob are playing a game about strings. Before starting the game, they should prepare n strings s1, s2, ..., sn and a target string t. It's promised that each of these n strings is a substring of t. When the game begins, they do the following things alternately while Alice starts first: Choose a string si from the n strings; Append one letter to the chosen string; The new string must also be a substring of t. If the above things cannot be completed, the player loses the game. Suppose Alice and Bob both use optimal strategy, find who will win the game.

Recently Alice and Bob are playing a game about strings. Before starting the game, they should prepare n strings s1, s2, ..., sn and a target string t. It's promised that each of these n strings is a substring of t. When the game begins, they do the following things alternately while Alice starts first: Choose a string si from the n strings; Append one letter to the chosen string; The new string must also be a substring of t. If the above things cannot be completed, the player loses the game. Suppose Alice and Bob both use optimal strategy, find who will win the game.

HBC15414AStringGame题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC15414AStringGame题解