摘要: Link Solution: f[i][j]= 1 if i cats can make up j blood. f[0][0]=1 #include <bits/stdc++.h> # define LL long long using namespace std; int n; int a[21 阅读全文
posted @ 2020-02-14 18:18 feibilun 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Link Solution: Get the posistions of numbers of P2 in P1, find the LIS in this position array. #include <bits/stdc++.h> # define LL long long using na 阅读全文
posted @ 2020-02-14 10:49 feibilun 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Link class Solution { public: int lengthOfLIS(vector<int>& nums) { int n=nums.size(); if(n==0) return 0; vector<int> dp(n+1); int len=1; dp[1]=nums[0] 阅读全文
posted @ 2020-02-14 10:39 feibilun 阅读(141) 评论(0) 推荐(0) 编辑