#include typedef long long ll; #define REP(i, n) for(int i = 0; i < (int)(n); i++) #define FOR(i, a, b) for(int i = (int)(a); i < (int)(b); i++) using namespace std; const int MAX = 10003; ll INF = 10000000000; ll dp[1002][MAX+1]; int main() { int N; cin >> N; ll A[N+1]; for (int i=0; i> A[i]; } for (int i=0; i