majay1638's blog

By majay1638, history, 6 weeks ago, In English

Hi , I'm Getting TLE error on some python solutions so i used accepted python solutions also still tle error what is wrong with my code

Accepted Python Solution but now i'm getting TLE : SOlution Link

Exact copy paste solution still TLE : MY Solution

EDIT : I do not know what's happening this solution also gives TLE But Algorithm Time Complexity is O(n) it should work fine can anyone help me.

Read more »

 
 
 
 
  • Vote: I like it
  • +8
  • Vote: I do not like it

By majay1638, history, 3 months ago, In English

Hi guys, I am trying to solve segment tree question on cses . my Python solution passes only 1 test case and gives me TLE, but c++ solution get accepted, i tried to look online optimize python solution but still no luck , if you can help me to optimize my code it would be great .

problem : https://cses.fi/problemset/task/1648

My code Link : code link

Thanks

Read more »

 
 
 
 
  • Vote: I like it
  • -3
  • Vote: I do not like it