Yes, that’s the exact situation the testcase in the OP is designed to break - it makes yours TLE (it’s been running for over 10 minutes so far) ![]()
Edit:
Here’s a direct link to the generated testcase for people who don’t want to run the python testcase generator.
Edit2:
Re: the secondary point about unfairness for Python users - take a look at the variance in these (apparently quite recent) benchmarks:
In the “pidigits” benchmark, the performance gap is quite narrow - python3 is approx 2x slower than C++.
In the “reverse-complement” benchmark, the gap is much more pronounced - python is about 10x slower.
In the “fannkuch-redux” benchmark, the slowdown is approx 53x.
The “mandelbrot” benchmark? \huge 171\text{x}!!!
So there’s really no sensible way of making things fair using a fixed multiplier - python’s slowdown depends very heavily on the task being performed.