摘要: 1 class Solution 2 { 3 public: 4 int longestPalindromeSubseq(string s) 5 { 6 int n = s.size(); 7 // dp 数组全部初始化为 0 8 // 在子串s[i..j]中,最长回文子序列的长度为dp[i][j] 阅读全文
posted @ 2020-05-07 09:21 Jinxiaobo0509 阅读(131) 评论(0) 推荐(0)
摘要: 1 class Solution 2 { 3 public: 4 bool canIWin(int M, int T) 5 { 6 if (M*(M+1)/2 < T) return false; 7 if (T <= M) return true; 8 m_ = vector<int>(1 << 阅读全文
posted @ 2020-05-07 08:57 Jinxiaobo0509 阅读(113) 评论(0) 推荐(0)