publicstaticvoidmain(String args[])throws IOException{ BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(bf.readLine()); int[] A = newint[N + 1]; int[] DP = newint[N + 1]; int[] R = newint[N + 1]; int ans1 = 1; int ans2 = 1; int max = 0; StringTokenizer st = new StringTokenizer(bf.readLine());
for(int i = 1; i <= N; i++) { A[i] = Integer.parseInt(st.nextToken()); }