Abnormally different execution times

Правка en1, от amarnathsama, 2021-06-05 14:58:11

Me and my friend both did problem D(link) from last contest(#723),

My Code

His Code

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.

Теги #recursion

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский amarnathsama 2021-06-05 14:59:44 0 (published)
en2 Английский amarnathsama 2021-06-05 14:59:23 42 (saved to drafts)
en1 Английский amarnathsama 2021-06-05 14:58:11 637 Initial revision (published)