#include using namespace std; int main() { int N; cin >> N; vector V(N); for(int i=0; i> V[i]; // DP vector dp(N+1); dp[1] = V[0]; for(int i=1; i