Help in 909D-Colorful Points
I have implemented this solution for problem
I can't understand why I am getting runtime error in 2nd case and if I avoid that I am getting TLE in 6th instead of the fact that I am getting output for both cases on my IDE.
Any help is appreciated :)