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
阅读全文
摘要: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
阅读全文
摘要:#include <bits/stdc++.h> #include <unordered_map> //数状数组; using namespace std; class Solution { private: int lowbit(int x) { return x & -x; } vector<i
阅读全文
摘要:#include <bits/stdc++.h> using namespace std; //以下是线段树的模板,让区间查询和修改的时间复杂度到O(lgn); class XianDuanTree{ private: vector<int> arr; vector<int> tree; publi
阅读全文