-emli-'s blog

By -emli-, history, 9 years ago, In English

Please explain why my code is getting TL 11828548?

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

| Write comment?
»
9 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Lengths of string is l <= 10^6. Your program works O(len ^ 2) in worst case. Cause time limit is 1ses. your program (O(10 ^ 12)) could be very slow for this problem. O (10 ^ 9) works about 1sec. with standart compilators.