摘要: Input A B MC = 1e9The equation of p2 winning is (Na * C + Nb) % M == 0, that's (Na * (C % M) + Nb % M) % M == 0Further, p1 controls M1 = (Na * (C % M)) % M, p2 controls M2 =Nb % MIf B >= M - 1, P1 has no chances to win, because P2 can always pick a number makes (M2 + M1) % M == 0If A == B == 阅读全文
posted @ 2011-10-14 23:53 DOF_KL 阅读(282) 评论(0) 推荐(0) 编辑