会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
fourmi的笔记本
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
20
下一页
2022年5月8日
leetcode(c++)(BFS)
摘要: #include <iostream> #include <sstream> #include <queue> #include <string> #include <unordered_set> #include <unordered_map> using namespace std; struc
阅读全文
posted @ 2022-05-08 12:02 fourmii
阅读(36)
评论(0)
推荐(0)
2022年5月7日
leetcode(c++)(扫描线)
摘要: #include <iostream> #include <vector> #include <unordered_map> #include <queue> #include <algorithm> using namespace std; bool cmp(pair<int,int>&p1,pa
阅读全文
posted @ 2022-05-07 07:11 fourmii
阅读(59)
评论(0)
推荐(0)
2022年5月4日
leetcode(c++)(链表)
摘要: #include <iostream> #include <vector> #include <unordered_map> using namespace std; struct LinkNode { int val_ = 0; LinkNode* next = nullptr; LinkNode
阅读全文
posted @ 2022-05-04 20:02 fourmii
阅读(53)
评论(0)
推荐(1)
leetcode(c++)(单调栈)
摘要: #include <iostream> #include <stack> #include <vector> #include <queue> #include <unordered_map> #include <string> using namespace std; //最小栈 class Mi
阅读全文
posted @ 2022-05-04 13:55 fourmii
阅读(117)
评论(0)
推荐(0)
2022年5月3日
leetcode(c++)(并查集)
摘要: #include <iostream> #include <vector> using namespace std; class DSU{ public: vector<int>parent; DSU(int n) { parent = vector<int>(n); for(int i = 0;
阅读全文
posted @ 2022-05-03 20:20 fourmii
阅读(71)
评论(0)
推荐(0)
leetcode(c++)(双序列)
摘要: #include <iostream> #include <string> #include <vector> using namespace std; int lcs(string text1,string text2) { int n1 = text1.size(), n2 = text2.si
阅读全文
posted @ 2022-05-03 12:28 fourmii
阅读(42)
评论(0)
推荐(0)
leetcode(C++)(单序列)
摘要: #include <iostream> #include <vector> #include <unordered_set> #include <unordered_map> #include <string> using namespace std; int climbStairs(int n)
阅读全文
posted @ 2022-05-03 10:00 fourmii
阅读(25)
评论(0)
推荐(0)
2022年5月1日
leetcode(c++)(博弈类dp)
摘要: #include <iostream> #include <vector> using namespace std; bool canWin(int n) { vector<bool>dp(max(n+1,4)); dp[3] = dp[1] = dp[2] = true; for(int i =
阅读全文
posted @ 2022-05-01 21:39 fourmii
阅读(41)
评论(0)
推荐(0)
leetcode(c++)(坐标DP)
摘要: #include <iostream> #include <vector> #include <stack> using namespace std; int uniquePaths(int m, int n) { vector<vector<int>>dp(m,vector<int>(n)); f
阅读全文
posted @ 2022-05-01 11:25 fourmii
阅读(35)
评论(0)
推荐(0)
2022年4月30日
leetcode(c++)(区间DP)
摘要: #include <iostream> #include <vector> #include <string> using namespace std; string longestPalindrome(string s) { int n = s.size(); vector<vector<bool
阅读全文
posted @ 2022-04-30 17:34 fourmii
阅读(50)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
20
下一页
公告