import java.util.*; public class Solution { /** * pick candy * @param arr int整型一维数组 the array * @return int整型 */ public int candy (int[] arr) { // write code here int N = arr.length; int ans = 1; int inc = 1, dec = 0, pre = 1; for...