Redian新闻
>
15根火柴俩人轮流去,一次1-3根,最后总数为奇数的赢,怎搞?
avatar
15根火柴俩人轮流去,一次1-3根,最后总数为奇数的赢,怎搞?# JobHunting - 待字闺中
b*w
1
帮人问,谢谢!
avatar
p*w
2
有趣,先re 后想

【在 b*w 的大作中提到】
: 帮人问,谢谢!
avatar
s*x
3
15 1+3,2+2,3+1
15 = 4*3 + 3

【在 b*w 的大作中提到】
: 帮人问,谢谢!
avatar
m*f
4
不是最后一根赢, 是总数为奇数赢
我再想想

【在 s*x 的大作中提到】
: 15 1+3,2+2,3+1
: 15 = 4*3 + 3

avatar
b*w
5
exactly

【在 m*****f 的大作中提到】
: 不是最后一根赢, 是总数为奇数赢
: 我再想想

avatar
n*t
6
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*w 的大作中提到】
: 帮人问,谢谢!
avatar
b*w
7
thanks, is there some "principled" way to solve problems like this?

【在 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)

avatar
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)

avatar
b*e
9
又是小学数奥, 对吧.

【在 s*x 的大作中提到】
: 15 1+3,2+2,3+1
: 15 = 4*3 + 3

avatar
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 的大作中提到】
: 帮人问,谢谢!
avatar
t*l
11
15根想奇想偶都可以,
考虑一个人如果想从n根开始得到奇和得到偶分别可以不可以,
比如n=1的时候,可以奇,但不可以偶
n=2的时候,可以奇也可以偶
n=3的时候,也都可以
以后n的情况可以根据n-3,n-2,n-1的情况得出:
比如n=4, 是可以奇不可以偶:取三根后,下一个人得不到偶(这是用n=1的情况得到的
),也就是我能得到奇;相反地,不论取1,2,3根,都不能使得下一个人得不到奇,
所以我得不到偶。。。以此类推,得到15的情况。

【在 b*w 的大作中提到】
: 帮人问,谢谢!
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。