参考: https://oi-wiki.org/ds/li-chao-tree/ 例题: P4097 [HEOI2013]Segment #include<bits/stdc++.h> #define db double const int p=39989; using namespace std; ...
分类:
其他好文 时间:
2021-01-18 11:39:35
阅读次数:
0
一、getchar()和cin.get() getchar()会将开头的空格或者回车作为输入 1 #include<iostream> 2 using namespace std; 3 int main(){ 4 char ch1 = getchar(); 5 char ch2 = getchar( ...
分类:
其他好文 时间:
2021-01-18 11:19:13
阅读次数:
0
hbase写数据流程 ?先从 zk找到meta表的region位置,然后读取meta表中的数据,meta表中存储了用户表的region信息 根据namespace、表名和rowkey信息。找到写入数据对应的 region信息 找到这个region对应的regionServer,然后发送请求 把数据分 ...
分类:
其他好文 时间:
2021-01-18 11:07:30
阅读次数:
0
对结构体排序 ''' #include<iostream> #include<algorithm> using namespace std; const int si= 101; struct segment { int l, r; bool operator < (const segment v) ...
分类:
编程语言 时间:
2021-01-18 11:05:01
阅读次数:
0
题目 题目链接:https://codeforces.com/problemset/problem/757/F 给定一个 \(n\) 个点,\(m\) 条边的带权无向图,和起点 \(s\)。 选择一个点 \(u\)(\(u \neq S\)),使在图中删掉点 \(u\) 后,有尽可能多的点到 \(s ...
分类:
其他好文 时间:
2021-01-18 10:37:30
阅读次数:
0
#include<bits/stdc++.h> using namespace std; const long long mod=1e9+7; const long long mod2 = 1e8+7; const long long N =1e6+10; void in(long long &x) ...
分类:
其他好文 时间:
2021-01-15 12:03:41
阅读次数:
0
A - Biorhythms 题目链接 #include <iostream> #include <cstring> #include <algorithm> #include <cstdio> using namespace std; int main() { int cnt = 1; while ...
分类:
其他好文 时间:
2021-01-15 11:49:12
阅读次数:
0
#include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 #define rush! ios::sync_with_stdio(false);cin.tie(0); c ...
分类:
其他好文 时间:
2021-01-13 11:33:41
阅读次数:
0
思路:维护一个K大小的最小堆,堆顶就是最小的元素,新元素都比堆顶小,当堆中元素个数小于K时,直接进入堆,当堆顶小于新元素时,弹出堆顶,新元素加入堆。 #include <iostream> #include <vector> #include <queue> using namespace std; ...
分类:
其他好文 时间:
2021-01-13 11:29:41
阅读次数:
0
#include <iostream> #include <stack> using namespace std; class GetMinStack{ public: void push(int x); void pop(); int top(); int getmin(); private: s ...
分类:
其他好文 时间:
2021-01-13 11:27:28
阅读次数:
0