On Tuesday, April 15, 2014 11:06:38 AM UTC+5:30, Xiongqi ZHANG wrote:
> Sorry for the last reply. It is the other way.
>
>
>
>
> For Deceitful War, Naomi always check his lightest block (denoted as Ln), if
> Ken's lightest block (denoted as Lk) is heavier than Ln (i.e. Lk > Ln),
>
> then Naomi plays with this block and say it is a little bit lighter than
> Ken's heaviest block (denoted as Hk); otherwise, Naomi plays with this block
> as say it is a little bit heavier than Hk.
>
>
>
>
> 2014-04-15 13:34 GMT+08:00 Xiongqi ZHANG <[email protected]>:
>
>
>
> For War, there is no strategy at all for Naomi. For Ken, if you have blocks
> heavier what Naomi chooses, use the lightest one among them; otherwise, use
> the lightest one among all.
>
>
>
>
> For Deceitful War, Naomi always check his lightest block (denoted as Ln), if
> Ken's lightest block (denoted as Lk) is heavier than Ln,
>
>
> then Naomi plays with this block and say it is a little bit heavier than
> Ken's heaviest block (denoted as Hk); otherwise, Naomi plays with this block
> as say it is a little bit lighter than Hk.
>
>
>
>
>
> 2014-04-15 12:36 GMT+08:00 Subhadip Pramanik <[email protected]>:
>
>
>
>
>
> Hi,
>
>
>
> Can anyone explain the strategies taken by Naomi and Ken? I am little
> confused on Naomi's strategy. Please help me.
>
> Thanks in advance.
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>
> To post to this group, send email to [email protected].
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/4168c0d8-48ec-466a-bee3-81059c42aaba%40googlegroups.com.
>
>
>
>
> For more options, visit https://groups.google.com/d/optout.
Thanks Xiongqi,
Your agree with your solution for Naomi's strategy.
As per the problem statement:
Ken follows a strategy to get maximum win
Ken always follows the same strategy
Even though Naomi cheats in the game, Ken follows the same old strategy as
he is not aware about Naomi's cheats
Based on these I think Ken's strategy should be something like
Ken chooses box of weight immediately higher than that of Naomi's chosen box
If there is no box weighting higher than Naomi's chosen box then Ken choose
the least weight box
Considering this as Ken's strategy (which should be practically), looking at
the sample inputs case 4
9
0.186 0.389 0.907 0.832 0.959 0.557 0.300 0.992 0.899
0.916 0.728 0.271 0.520 0.700 0.521 0.215 0.341 0.458
The output mentioned here is
Case #4: 8 4
But this sample output seems to be wrong for score of Naomi if war played
deceitfully. Here is the reason:
Naomi's told weight shouldn't reveal the cheat
So Naomi would like to first take out Ken's higher weighting blocks by her
lower blocks using cheat weights,
But Naomi can't tell a weight higher than the highest weight of Ken's blocks
finally Ken is still playing the same old strategy to get maximum wins
In such case the deceitful game should look like:
Chosen_N|Told_N|Chosen_K|Win
0.186 |0.915 |0.916 |K
0.300 |0.727 |0.728 |K
0.389 |0.699 |0.700 |K
0.557 |0.558 |0.215 |N
0.832 |0.833 |0.271 |N
0.899 |0.900 |0.341 |N
0.907 |0.908 |0.458 |N
0.959 |0.960 |0.520 |N
0.992 |0.993 |0.521 |N
So even Naomi plays deceitful war, she can win only 6 times.
This seems real game play scenario to me. Please let me know if I am wrong.
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/cd97d130-efdf-42fd-b9e5-30fdb87c3068%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.