improvement_19's blog

By improvement_19, history, 3 years ago, In English

https://codeforces.me/contest/1220/submission/122950923 i have tried this a lot but still not able to remove TLE in case of input n is 10^3 so automatically input will be o(n^2) so how to do it?? thanks in advance

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

| Write comment?
»
3 years ago, # |
  Vote: I like it +16 Vote: I do not like it

Floating-point input is slow, you should take input as an integer, and cast it to a long double later on.