How do you prepare for a competitive programming competition?
I've recently participated in a competitive programming competition in a team, and we were given the option to choose Java, C or C++ (We picked Java). To be honest, we didn't do so well. We are ranked 17 out of 29 and only solved 3 questions out of 10.
One of the factors IMO, is that I am too dependent on high-level / scripting languages (Python and JavaScript) as there are too much abstraction, especially Python, which limits my problem solving ability.
Despite that I've only learned about the competition 2 weeks before it is conducted. In your opinion, what are the factors should be taken into account when / before participating a competitive programming competition?