I'm looking to get into competitive programming and aiming for a top spot in the British Informatics Olympiad next year. I have a strong understanding of programming fundamentals, but I've primarily used Python and want to avoid relearning syntax from scratch, especially since many competitions favor C++. My main concern is that the problems usually need solutions running in under 1 second. Can anyone check out a problem from the Olympiad and let me know if Python can handle that, or if it's just too slow? Here's the link to the problems: [https://www.olympiad.org.uk/papers/2024/bio/bio24-exam.pdf](https://www.olympiad.org.uk/papers/2024/bio/bio24-exam.pdf)
3 Answers
Since you have the competition questions, why not try solving them yourself first? It'll give you a better idea of what you might face.
Is there a specific Python division, or are you going to be competing against C++ users? If it's the latter, it's going to be tough to win against them.
Actually, you can use any programming language, but speed isn't the only factor. It's also about logic and how you deal with the problems. You get 3 hours for 3 questions, so spending time on problem-solving is key. I just need to know if Python can really perform under those conditions.
You definitely don't have to relearn everything. If you're proficient in one language, picking up another will feel much easier. That said, if you want your code to run really fast, C or C++ would be better. But if your goal is just to get it working and you're more comfortable with Python, go for it! It's an easier language for crafting solutions. Maybe consider Go as a middle ground too depending on the competition rules.
I just worry about Python's runtime capabilities. Could you take a look at the problems and suggest the time complexity I should aim for? Problem-solving is my main focus right now.

I can solve the questions, but I'm not confident about efficiency techniques to get under 1 second, which is why I'm hoping more experienced programmers can guide me.