Time and space complexity issue

what is the time and space complexity of holi spoj problem for the solution given in the video.specify the complexities with the work they are used for.also provide the code for holi spoj problem.

Hey @Rj.25
Here is the solution https://codeforces.com/blog/entry/8149 with explanation

If your doubt is resolved please mark it as closed.

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.