Guest User

Untitled

a guest
Oct 15th, 2016
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def M(A):
  2.         V = [0]*(len(A)+1)
  3.  
  4.         for i in range(0,len(A),1):
  5.                 for j in range(0,i+1,1):
  6.                         if (A[i] > A[j]):
  7.                                 V[i]=max(V[i],V[j]+1)
  8.         return max(V)
  9.  
  10. A = [1,2,44,3,5,100,220,6]
  11. print M(A)
RAW Paste Data