大时代1105
大时代1105
全部文章
分类
题解(12)
归档
标签
去牛客网
登录
/
注册
大时代1105的博客
全部文章
(共28篇)
题解 | #mari和shiny#
思路 dp 过程 代码 #include <iostream> #include <vector> #include <unordered_map> using namespace std; const int N = 1e6; long long s,...
2025-02-27
1
60
题解 | #两个链表的第一个公共结点#
思路 链表 过程 代码 class Solution { public: ListNode* FindFirstCommonNode(ListNode* pHead1, ListNode* pHead2) { ListNode* cur1 = pHead1, *c...
2025-02-27
0
27
题解 | #扑克牌顺子#
思路 找规律 过程 代码 class Solution { bool hash[14] = { 0 }; public: bool IsContinuous(vector<int>& nums) { int maxVal = INT...
2025-02-22
0
38
题解 | #添加逗号#
思路 模拟 过程 代码 #include <iostream> #include <algorithm> using namespace std; int main() { string str, ans; cin >> str; ...
2025-02-22
0
40
题解 | #【模板】完全背包#
1. 问题分析 完全背包dp问题 2. 过程 3. 代码 #include <iostream> #include <cstring> using namespace std; const int N = 1010; int n, V, v[N], w[N]; ...
2024-10-19
0
45
题解 | #【模板】01背包#
问题分析 背包dp问题 过程 代码 #include <iostream> #include <cstring> using namespace std; const int N = 1010; int n, V, v[N], w[N]; int dp[N]...
2024-10-17
0
49
题解 | #【模板】二维前缀和#
1. 思路 二维前缀和 2. 求解过程 3. 复杂度分析 时间复杂度:O(m*n) + O(q) 空间复杂度:O(m*n)
2024-07-28
0
120
题解 | #【模板】前缀和#
1. 思路 前缀和 2. 求解过程 3. 复杂度分析 时间复杂度:O(N) + O(q) 空间复杂度:O(N) 4. 代码 #include <iostream> #include <vector> using namespace std; int main() {...
2024-07-28
0
102
首页
上一页
1
2
3
下一页
末页