Can someone help me in solving this game theory problem? I am not able to get the discussions /editorial , this problem is very tough . Please Help !!!!!!!!!!
Problem Link :
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3947 |
2 | jiangly | 3734 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | ecnerwala | 3581 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | ksun48 | 3479 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | awoo | 162 |
2 | maomao90 | 160 |
3 | nor | 156 |
4 | cry | 155 |
4 | adamant | 155 |
4 | atcoder_official | 155 |
4 | -is-this-fft- | 155 |
8 | maroonrk | 153 |
9 | SecondThread | 147 |
10 | Petr | 146 |
Can someone help me in solving this game theory problem? I am not able to get the discussions /editorial , this problem is very tough . Please Help !!!!!!!!!!
Problem Link :
Название |
---|
First observation: the values of the stones by themselves doesnt matter, what matters is their value mod 3. In particular, what matters is the ammount of each stone on each mod value. From now on when i talk about value im talking about the value mod 3.
Second observation: you can never start with a stone that has value 0, so you will have to pick either one with value 1 or 2. After you pick a stone with value 2, you cant pick a stone with value 1, so you will have to pick a stone with value 2, and then you will have to pick a stone with value 1, and them two, and so it goes. The order you need to take the stones is fixed
Third observation: stones with value 0 essentially skip the turn. If the number of them is even, then nothing can be done because if you want to skip the turn the opponent can always skip back. If its odd, then you will be able to skip the turn if it favors you, even if the opponent tries to fight against that.
Solution: test for picking a stone with value 1 first, then for picking a stone with value 2 first. You will keep alternating between them after that, and the loser is the one who runs out of stones of the type he wants that turn (you also need to think of the scenario where all of the stones run out, which is really annoying). If the number of stones with value 0 is odd, then the loser is the opposite (because of the third observation). Then you pick which situation is the one that is better for the first player, because they are going to choose which one the game starts.