Hi!
I solved this problem, but my runtime is very large(1.040 sec). I'm interesting in your solutions, what method do you use and what is the complexity of your algo? My algo is  O(n^3 logN).
11654  Arithmetic Subsequence
Moderator: Board moderators
Re: 11654  Arithmetic Subsequence
my run time complexity is N^3. its a pretty straight forward DP problem.
Re: 11654  Arithmetic Subsequence
Same as yours got 0.364sec.Igor9669 wrote:Hi!
I solved this problem, but my runtime is very large(1.040 sec). I'm interesting in your solutions, what method do you use and what is the complexity of your algo? My algo is  O(n^3 logN).
Re: 11654  Arithmetic Subsequence
Do you use stl in your solution?Chimed wrote:Same as yours got 0.364sec.
Last edited by Igor9669 on Thu Aug 27, 2009 7:16 pm, edited 1 time in total.
Re: 11654  Arithmetic Subsequence
Could you explain it?crip121 wrote:my run time complexity is N^3. its a pretty straight forward DP problem.

 New poster
 Posts: 15
 Joined: Thu Jun 18, 2009 12:01 pm
 Contact:
Re: 11654  Arithmetic Subsequence
Let a[j] = Number of arithmetic subset using number 1 to j and last two number is i'th and j'th.
O(N^3)
O(N^3)

 Learning poster
 Posts: 64
 Joined: Fri Sep 25, 2009 11:29 am
 Location: Chittagong,University of chittagong
 Contact:
Re: Hi14
tobeads wrote:Hi,everyone
I'm from UK!
jewelry boxes wood
jewelry boxes that play music in wheeling west virginia
jewelry boxes stacked
jewelry box, mother of pearl lid
jewelry box that is wooden log
What is this ?
Try to catch fish rather than asking for some fishes.