#include <string.h> #include <stdio.h> #include #include using namespace std; int n,m,a[11000],c[11000]; //差分建树,区间更新 int lowbit(int x) { return x&-x; ...
分类:
编程语言 时间:
2020-10-06 20:10:09
阅读次数:
25
#include <bits/stdc++.h> using namespace std; stack<char> stack_op; stack<int> stack_num; char str[10000]; string change; int pow(int x, int y) { int ...
分类:
其他好文 时间:
2020-10-06 20:08:42
阅读次数:
25
T1 problem: 给定一维空间内若干区间和一些点,要求选出其中某些区间(不能不选)使得存在一个点属于给定点集满足此点被每一个选出区间所包含 求选择的方案数 data range: \(N<=10^5\) solution: 对于每一个点考虑 将点按照位置从小到大排序 如果当前有A个区间包含此点 ...
分类:
其他好文 时间:
2020-10-06 19:56:16
阅读次数:
28
#include <iostream> #include <string> #define MAX 500 using namespace std; struct person { string name; int age; }; struct contact { person persons[MA ...
分类:
编程语言 时间:
2020-10-05 22:33:17
阅读次数:
48
查询回文子串个数: #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<double,int> pii; const int N = 3e5+5; const int M = 1e6+5; c ...
分类:
其他好文 时间:
2020-10-05 22:16:55
阅读次数:
30
XPath,是在 XSLT 标准中的主要元素,用于在 XML 文档中选择元素,我们可以理解为元素选择器(功能上与 CSS Selectors 类似)。 我们感觉 XPath 比 CSS Selector 好用,也可能是我们不熟悉 CSS 选择器,也可能是我们的场景使然。 学习路线(Learning ...
分类:
其他好文 时间:
2020-10-05 21:49:27
阅读次数:
35
#include<bits/stdc++.h> using namespace std; const int N = 300010; vector<int>p[N]; int ans[N]; int main() { int t; scanf("%d",&t); while(t --) { int ...
分类:
其他好文 时间:
2020-10-05 21:46:03
阅读次数:
23
#include <bits/stdc++.h> using namespace std; //不是递增的话就删掉,然后重新计算一次 int getMaxArea(vector<int> &vec) { stack<int> s; int max_area = 0; int i=0; int tp, ...
分类:
编程语言 时间:
2020-09-24 21:38:31
阅读次数:
46
学习 ovsSingleBr.py 和 ovsMultiBr.py,在下图拓扑中实现一个 VLAN。 代码如下 1 from mininet.net import Mininet 2 from mininet.node import Node 3 from mininet.link import T ...
分类:
Web程序 时间:
2020-09-24 21:31:31
阅读次数:
57
RT 考试的时候口胡出来的,正确性不会证,不过貌似100000内的数都是对的(现在已经会了,在此鸣谢gyz大佬) #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=5e7+10,max ...
分类:
其他好文 时间:
2020-09-24 21:27:32
阅读次数:
46