https://www.spoj.com/problems/HOLI/ concept: PIGEONHOLE+DFS

https://ideone.com/NgpkDC i am getting correct solution for custom input…but i am getting a tle for this solution…can anyone please help??

Hey @shameek.agarwal
Where did you get TLE for this solution ? SPOJ or CB ?
It seems perfectly correct.

1 Like

i got tle at spoj…please help!!

@shameek.agarwal
Try using fast IO.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

it didnt change anything still getting tle

@shameek.agarwal
A TLE on SPOJ is not a big deal
The bounds there are unnecessarily complex
I suggest you leave this question and move ahead now