3 ms·
Cool. Recursion in python is common bottleneck in competitive programming. Will give it a try. I created a similar tool for recursion [1]. But ended with rewrit
by denys_potapov 10mo ago
Cool. Recursion in python is common bottleneck in competitive programming. Will give it a try. I created a similar tool for recursion [1]. But ended with rewriting AST and emulating stack. Pros - no need for accumulator, cons - almost unusable in real world.
[1] https://dev.to/denyspotapov/callonce-python-macro-for-unlimited-recursion-depth-3l5k https://dev.to/denyspotapov/callonce-python-macro-for-unlimi...
- qsort 10mo agoDo you frequently use Python for competitive programming puzzles? I've done it a bit in the past, and everyone always used C++.
- denys_potapov 10mo agoAlways. Probably you can't get in top 100 with python[1]. But I like dicts with tuple keys, bigints, all the list things. [1] My best is around 1300 place in HackerCup.
- btilly 10mo agoI have to wonder how much better you'd do if they made pypy an option.