11412 - Dig the Holes
Posted: Mon Nov 24, 2008 2:37 am
Could somebody who got this problem please explain the precise rules for computing n1 and n2? I used Mastermind rules, and I'm getting WA. Thanks.
Code: Select all
if (hidden[0] == guess[0]) ++n1;
else if (hidden[0] == guess[1] || hidden[0] == guess[2] || hidden[0] == guess[3]) ++n2;
Yep, that was it. Thanks.Vytenis wrote:Maybe, you missed the fact that all four coins that you have to guess are of distinct colors?
Code: Select all
3
YGOR 4 0
RGOB 4 0
RBVY 2 1
ORVY 4 0
GYBV 2 1
YORV 0 2
Code: Select all
cheat //but it is true for this sequence GROB
possible //but what is the sequence
possible //what is the sequence for which it is possible