And check the columns in your 4,10. It's not a Latin square. On Tue, Apr 7, 2020 at 4:59 PM Andrii Kovalov <and.s.kova...@gmail.com> wrote:
> From your dictionary you are missing 2,4; 3,9, a whole bunch of 4's, and > if you want to pass the small test set, you need to add 5's as well. > > On Tuesday, 7 April 2020 18:55:57 UTC+2, Shivanjan Chakravorty wrote: >> >> I had a different approach to solving this problem. I generated all the >> possible orthogonal latin squares of all possible sizes and for every size >> cached the mattrices based on their trace. So that way it was like. Now for >> 1 to 50 this thing is done in less than 3 seconds and now all you have to >> do is read the input, check if the keys pair exists and print the answer. I >> do not have any idea why it wasn't accepted. Can anyone tell where was I >> missing the corner case? >> >> { >> "1": {}, >> "2": { >> "2": [[ 1, 2], >> [ 2, 1]] >> }, >> "3": { >> "3": [[ 1, 2, 3], >> [ 3, 1, 2], >> [ 2, 3, 1]], >> >> "6": [[ 1, 2, 3], >> [ 2, 3, 1], >> [ 3, 1, 2]] >> }, >> "4": { >> "4": [[ 1, 2, 3, 4], >> [ 4, 1, 2, 3], >> [ 3, 4, 1, 2], >> [ 2, 3, 4, 1]], >> >> "8": [[ 1, 2, 3, 4], >> [ 2, 3, 4, 1], >> [ 3, 4, 1, 2], >> [ 4, 1, 2, 3]], >> >> "10": [[ 1, 2, 3, 4], >> [ 3, 4, 1, 2], >> [ 1, 2, 3, 4], >> [ 3, 4, 1, 2]] >> } >> } >> > -- > 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 google-code+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/f6a97b35-498a-4a2c-9ffd-db1a3e9ac1b6%40googlegroups.com > <https://groups.google.com/d/msgid/google-code/f6a97b35-498a-4a2c-9ffd-db1a3e9ac1b6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 google-code+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CAMAzhzgjZL3WzKnTew9Nru9GrSAx1BS4mqtSZ_nixdB1ZftQzg%40mail.gmail.com.