摘要: /** *一定要明确dp数组的含义 * * * * */ class Solution{ private: int arr[10][10]; int dp[10][10]; //dp数组的含义为对应位置到底部的最大和 int Length; public: Solution(int Length){ srand(time(NULL)); this->Length = Leng... 阅读全文
posted @ 2019-10-04 23:07 pycodego 阅读(122) 评论(0) 推荐(0) 编辑
摘要: package com.Long class Solution { private int Max=0; public int maxProfit(int[] prices) { for(int i=1;i0) { Max+=prices[i]-prices[i-1]; } } return ... 阅读全文
posted @ 2019-10-04 16:13 pycodego 阅读(207) 评论(0) 推荐(0) 编辑
摘要: package com.Long; import java.util.PriorityQueue; import java.util.Queue; import java.util.Random; class node implements Comparable{ int val; int Index; @Override public int compareTo(node arg... 阅读全文
posted @ 2019-10-04 16:05 pycodego 阅读(262) 评论(0) 推荐(0) 编辑
摘要: package com.file; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Arrays; class Solution 阅读全文
posted @ 2019-10-04 12:39 pycodego 阅读(388) 评论(0) 推荐(0) 编辑