On Tuesday, 14 June 2016 18:06:32 UTC+1, Morteza Keshtkaran  wrote:
> I will be appreciate if you can tell me if the code is correct or not.
> 
> Thanks.

Your solve code doesn't work properly once there are 8 or more players. 
Your first for loop works and is:
for (i = 0; i < 8; i += 2) 
This runs 4 times putting results in 0, 2, 4, 6

The next loop is:
for (i = 0; i < 4; i += 4)
This only runs once checking 0 vs 2. 4 vs 6 is left unchecked, giving a win to 
4 no matter what. 

-- 
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/8af926b0-0add-48c0-a225-515769b385c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to