摘要:
一开始用Integer 怎么都超时,发现用int 才能过。Equilibrium index of a sequence is an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes.For example, in a sequence A:A[0]=-7 A[1]=1 A[2]=5 A[3]=2 A[4]=-4 A[5]=3 A[6]=0 3 is an equilibrium index, because:A[0]+A[1]+A[2]= 阅读全文
posted @ 2010-11-24 11:04 Teddy Yan 阅读(250) 评论(0) 推荐(0) 编辑