My friend and I did problem D([link](https://mirror.codeforces.com/contest/1535/problem/D)) from last contest(#723),↵
↵
[His Code](https://mirror.codeforces.com/contest/1535/submission/118486083)↵
↵
↵
[My Code](https://mirror.codeforces.com/contest/1535/submission/118499350)↵
↵
↵
We both use recursion and a similar-ish method to solve the question yet his code runs 4x faster than mine, normally this shouldn't be an issue since both our codes are comfortably within the time limit, but I was just wondering why there is such a huge difference in the execution time.↵
↵
Also, sorry if our code isn't very readable.
↵
[His Code](https://mirror.codeforces.com/contest/1535/submission/118486083)↵
↵
↵
[My Code](https://mirror.codeforces.com/contest/1535/submission/118499350)↵
↵
↵
We both use recursion and a similar-ish method to solve the question yet his code runs 4x faster than mine, normally this shouldn't be an issue since both our codes are comfortably within the time limit, but I was just wondering why there is such a huge difference in the execution time.↵
↵
Also, sorry if our code isn't very readable.