You are adding duplicate pair-wise entires to the output list (specifically this line --> new List<long[]> { new long[] { (int)a, b }, new long[] { b, (int)a } )
Make sure you're using long instead of int and double instead of float. The latter was causing issues in my solution and it worked fine on smaller n, but failed on test 10 and 11 which have pretty big input arguments.
You are adding duplicate pair-wise entires to the output
list
(specifically this line -->new List<long[]> { new long[] { (int)a, b }, new long[] { b, (int)a }
)Make sure you're using long instead of int and double instead of float. The latter was causing issues in my solution and it worked fine on smaller n, but failed on test 10 and 11 which have pretty big input arguments.