原题: https://leetcode.com/problems/dota2-senate/description/
题意: 有两个阵营R和D,一个阵营的成员可以将另一个阵营的成员“禁言”。假设两阵营的成员都采用最优策略。求最终剩下的具有发言权的阵营。
约定:(1)给定的字符串的长度的范围为[1,10000]。
例子:
Example 1:
Input: "RD"
Output: "Radiant"
Explanation: The first senator comes from Radiant and he can just ban the next senator's right in the round 1.
And the second senator can't exercise any rights any more since his right has been banned.
And in the round 2, the first senator can just announce the victory since he is the only guy in the senate who can vote.
Example 2:
Input: "RDD"
Output: "Dire"
Explanation:
The first senator comes from Radiant and he can just ban the next senator's right in the round 1.
And the second senator can't exercise any rights anymore since his right has been banned.
And the third senator comes from Dire and he can ban the first senator's right in the round 1.
And in the round 2, the third senator can just announce the victory since he is the only guy in the senate who can vote.