R (the Radiant clan) and D (the Dire clan). The string council gives the order in which they sit around the table.
Voting goes in rounds. In each round, members take turns starting from the first one; anyone who has lost their vote is skipped. On their turn, a member may:
- strip any member of the other clan of their vote, for good;
- declare victory for their clan, if everyone who still has a vote belongs to it.
Everyone plays optimally for their own clan. Return "Radiant" or "Dire": the clan that declares victory.council="DR" → 'Dire'
The D member moves first and strips the only R of their vote. Only D remains, so "Dire" wins.
council="RRDDD" → 'Radiant'
In round one the two Rs remove two Ds, and the remaining D removes the first R. In round two the second R removes the last D, so "Radiant" wins.
council="DRRD" → 'Dire'
council[i] is 'R' or 'D'council="DR"
'Dire'
Run checks the first 3 tests in your browser. Submit checks all 169 tests on the server, hidden ones included.