O(n^2) solution is getting accepted but O(n * (n — 1)) solution is getting TLE

Revision en1, by skpro19, 2016-01-20 10:57:21

The problem is Almost Arithmetic Sequences.

Accepted Solution

Time limit exceeded

Can someone please figure out why is this happening?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English skpro19 2016-01-20 10:58:38 40
en1 English skpro19 2016-01-20 10:57:21 350 Initial revision (published)