Dwarfs standing on the shoulders of giants puzzle discussion

TwoSteps no longer works at CodinGame. If you want, you may send me your code in private message and I can take a look.

1 Like

If anyone has an issue with the 7th validator (Arbitrary indexes), the following custom case may help you in debugging your code:

Input

13
9576 5462
8040 9576
9612 8040
8040 5462
9612 5462
7943 5462
9852 8040
9852 9612
8765 9576
9431 8040
3560 8040
2289 9431
2289 5462

Output

5