![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
king9666
这个作者很懒,什么都没留下…
展开
-
leetcode 2038. 如果相邻两个颜色均相同则删除当前颜色(博弈)
class Solution {public: bool winnerOfGame(string colors) { //遍历一遍判断有多少个满足的可删除的点就行了 int sum = 0; for(int i = 1;i < colors.size()-1;i++){ if(colors[i-1] == 'A'&&colors[i] == 'A'&&colors[i+1] == 'A..原创 2022-03-22 14:54:57 · 327 阅读 · 0 评论 -
剑指 Offer II 115. 重建序列
class Solution {public: bool sequenceReconstruction(vector<int>& org, vector<vector<int>>& seqs) { if (seqs.size() == 0) return false; int len = org.size(); vector<vector<int>&...原创 2022-03-18 19:17:29 · 438 阅读 · 0 评论