06 2022 档案

摘要:using namespace std; //二分模板 class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { vector<int> ans={-1,-1}; int n = nums.si 阅读全文
posted @ 2022-06-29 14:28 coyote25 阅读(28) 评论(0) 推荐(0) 编辑
摘要:1 #include <bits/stdc++.h> 2 #include <unordered_map> 3 using namespace std; 4 //线段树成,node版本; 5 class Node{ 6 public: 7 Node * left; 8 Node * right; 9 阅读全文
posted @ 2022-06-20 14:14 coyote25 阅读(48) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> #include <unordered_map> //数状数组; using namespace std; class Solution { private: int lowbit(int x) { return x & -x; } vector<i 阅读全文
posted @ 2022-06-19 15:58 coyote25 阅读(18) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; //以下是线段树的模板,让区间查询和修改的时间复杂度到O(lgn); class XianDuanTree{ private: vector<int> arr; vector<int> tree; publi 阅读全文
posted @ 2022-06-06 13:25 coyote25 阅读(86) 评论(0) 推荐(0) 编辑