公式

D - The Big Two 解説 by en_translator


Original Proposer: vwxyz

At least one of \(A_1\) and \(B_1\) is equal to \(x\) or \(y\). Suppose that \(A_1\) is contained in \((x,y)\), and consider the possible player for the other.

If there is no \(i\) with \(A_1 \not\in \{A_i,B_i\}\), choosing any player satisfies the conditions.
If there is \(i\) with \(A_1 \not\in \{A_i,B_i\}\), taking the intersection of all such \(\{A_i,B_i\}\) yields the set of the possible other player.

Same applies to \(B_1\).

This procedure yields all possible \((x,y)\), so the answer can be counted. Beware of duplicates.

投稿日時:
最終更新: