S=X[0]+X[N-1] for k in range(N): X[k]+=X[k]+S
S=X[0]*X[N-1] for k in range(N): X[k]=2*X[k]+S for i in range(3): S=S*2
S=X[1]+X[N-1]+3 for k in range(N): for m in range(N): X[k]=X[k]+S
T(N) = 5*N2 + 3*N + 1
T(N) = N3 - 3*N2 + N
T1(N) = N2 - N - 10 T2(N) = 4N + 40
S=X[0]+X[N-1] for k in range(N): X[k]+=S
S=X[0]+X[N-1] for k in range(N): for m in range(5): X[k]+=S
S=X[0]+X[N-1] for k in range(N): for m in range(N): for q in range(N): X[k]+=X[q]+S
S=X[0]+X[N-1] for k in range(N): for m in range(2*N*N): X[k]+=X[m]+S
k=0 for i in range(N): if X[i] == R: k=i break