b*w
7 楼
a*x
8 楼
there is some problem.you can't assume B always takes 1 or always takes 3.
A takes 2 first so 3~15 left
B takes 1 A takes 3 so 7~15 left
B takes 3 A takes 1 so 11~15 left
B takes 1 A takes 3 so only 15 left
B takes 15 B wins
I got an idea, but I am not sure if it is the only idea.
A takes 1 first.
not matter what B takes A takes 4 - B
to make sure A can takes No. 13
【在 n*t 的大作中提到】
: suppose A's turn first, first take 2, then
: if B take 1, A take 3;
: if B take 3, A take 1;
: if B take 2, A take 1 if n mod 4=0, A take 3 if n mod 4=1 (n is the number
: of matches left before B take in this round)
A takes 2 first so 3~15 left
B takes 1 A takes 3 so 7~15 left
B takes 3 A takes 1 so 11~15 left
B takes 1 A takes 3 so only 15 left
B takes 15 B wins
I got an idea, but I am not sure if it is the only idea.
A takes 1 first.
not matter what B takes A takes 4 - B
to make sure A can takes No. 13
【在 n*t 的大作中提到】
: suppose A's turn first, first take 2, then
: if B take 1, A take 3;
: if B take 3, A take 1;
: if B take 2, A take 1 if n mod 4=0, A take 3 if n mod 4=1 (n is the number
: of matches left before B take in this round)
b*e
10 楼
This is what I have so far.
Seems whoever goes first wins, and he needs to take 2. The pattern is
quite clear: it is just modulo 8 instead of 4, and repeats the pattern:
1 1 1 1 0 1 1 0
which means, the losing points are at 8k + 5 and 8k. So 15 = 8 + 7 is a
winning point.
E(2) = 1, O(2) = 1
E(3) = 1, O(3) = 1
E(4) = 0, O(4) = 1
E(5) = 1, O(5) = 0
E(6) = 1, O(6) = 1
E(7) = 1, O(7) = 1
E(8) = 1, O(8) = 0
E(9) = 0, O(9) = 1
E(10) = 1, O(10) = 1
E(11) = 1, O(11) = 1
E(12) = 0, O(12) = 1
E(13) = 1
【在 b*w 的大作中提到】
: 帮人问,谢谢!
Seems whoever goes first wins, and he needs to take 2. The pattern is
quite clear: it is just modulo 8 instead of 4, and repeats the pattern:
1 1 1 1 0 1 1 0
which means, the losing points are at 8k + 5 and 8k. So 15 = 8 + 7 is a
winning point.
E(2) = 1, O(2) = 1
E(3) = 1, O(3) = 1
E(4) = 0, O(4) = 1
E(5) = 1, O(5) = 0
E(6) = 1, O(6) = 1
E(7) = 1, O(7) = 1
E(8) = 1, O(8) = 0
E(9) = 0, O(9) = 1
E(10) = 1, O(10) = 1
E(11) = 1, O(11) = 1
E(12) = 0, O(12) = 1
E(13) = 1
【在 b*w 的大作中提到】
: 帮人问,谢谢!
相关阅读
“苹果” 的待遇问题,请教跳槽一次涨一万,有多大意思版上的仇恨多冲着startup,不是uber我刷题, 都刷了二三年了。。。Python面试的概念题?h1b回国工作几年再回来的可能性大么?报个uber offer面试应不应该考刷题是看立场的山雨欲来啊没人吐槽今年加州非常冷吗? (转载)跳槽 新工作的background check关于绿卡的几个问题。请教Google onsite第五轮都会问啥?又被烙印灭了绿卡,回国短期工作1-2年,美国护照孩子怎么跟着回。有什么办MS的SDE和L的Test Engineer选哪个?cs这个行业两年内一定完蛋现在面试 还有哪个傻逼公司问Lyft这周三可以在LAX开始运营了uber还不能大家提供reference时给推荐人的私人还是公司邮件地址?