(dp[i-1][0], dp[i-1][1])+1;
}
dp[i][0]=Math.max(dp[i-1][0], Math.max(dp[i-1][...1], dp[i-1][2]));
}
int res=Math.max(dp[n][0], Math.max(dp[n][1], dp[n][2]));...(dp[i-1][1] + work[i-1],dp[i-1][0]);
// 健身
dp[i][1] = Math.max(dp[i-1][0] + gym...[i-1],dp[i-1][1]);
}
int res=Math.max(dp[n][0], dp[n][1]);
System.out.println...(dp[i-1][0],dp[i-1][1] + prices[i]);
dp[i][1] = Math.max(dp[i-1][1],-prices[i]);