#include #define rep(i,a,b) for(int i=a;i>n; for(int i=0; i>v[i]; } dp[0][0] = dp[0][1] = dp[1][0] = v[0]; dp[1][1] = v[1]; for(int i=2; i