B. Kyoya and Permutation time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Let’s define the permutation of length n as an array p = [p1, p2
309.最佳买卖股票时机含冷冻期 public class Solution {public int MaxProfit(int[] prices) {if(prices.Length<2){return 0;}int [,]dp=new int[prices.Length,4];dp[0,0]=-prices[0];for(int i=1;i<prices.Length;i++){dp[i,0