There is something wrong in my code, I tried making everything long long int but it still gives me WA. It passes all test cases but gives WA after submission.
Please give me some hint as to where am I going wrong?
your fixed solution: Solution: 66695269 | CodeChef
(you printed sum_episode_length as an int instead of long long. Some variables should have been long long)
your fixed solution slightly improved: Solution: 66695148 | CodeChef
Just Note that nesting your loops that much will not work long term. It makes your code far too confusing for even easy problems. It is fine if you don’t have a feeling for that now, just make sure to improve yourself. Read other peoples code. Example clean solution: Solution: 58342283 | CodeChef
To remember all concepts and syntax I try to forcefully use some concept in program, it helps me learn more how a program would behave.
Would definitely write better code in future.
Regards.
Experimenting while practising is cool. But do not try the same during a contest.
Projects are an excellent way to try new things - you can benchmark the performance and compare whatever you’ve tried.