Help about TLE in questions

Hi!
Today I participated for very first 3 hr, Div 2&3 contest. But sadly, I had TLE in 2 of my problems. Everything else was correct.

Can someone help me about what to prepare and practice to avoid TLE.

Regards!