3-sided dice (UVa Live Archive Europe Southwestern 2010)

http://livearchive.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=399&page=show_problem&problem=2964

問題

3面ダイスが3個ある。それぞれのダイスの1,2,3が出る確率も分かっている。この3つのダイスを降る確率を適当に決め、別の3面ダイスをシミュレートできるか答えよ。

解法

ガウスの消去法で連立方程式の答えが(0,1)の範囲に収まっていたらYES。ランク落ちは適当に処理する。