Ansible简介 Ansible Logo Ansible概述 Ansible是新兴的自动化运维工具,基于Python开发,集合了众多运维工具(puppet、cfengine、chef、func、fabric)的优点,实现了批量系统配置、批量程序部署、批量运行命令等功能。 无需安装客户端。 Ans ...
分类:
其他好文 时间:
2020-03-28 19:44:05
阅读次数:
87
数据结构 单调栈 笛卡尔树 "Equivalent Prefixes 前缀笛卡尔树" 序列u,v 对于$[1,ans]$上所有的$[L,R]$$(1 include define int long long define scan(n) scanf("%lld", &(n)) define scan ...
分类:
其他好文 时间:
2020-03-28 01:00:31
阅读次数:
76
割边(Bridge) 模板 cpp vector ans; vector e[maxn]; void dfs(int u,int fa) { dep[u] = dep[fa] + 1; for(int v:e[u]) { if(v==fa) continue; if(!dep[v]) { dfs(v ...
分类:
移动开发 时间:
2020-03-28 00:45:52
阅读次数:
107
给定一棵有根树,每个结点有权值 $a_i$,记 $c_i$ 为 $i$ 的子树中权值 $ using namespace std; define int long long const int N = 2005; vector g[N]; priority_queue hp; int ans[N], ...
分类:
其他好文 时间:
2020-03-23 09:19:09
阅读次数:
64
典型的背包问题.对于每组积木跑一个背包,然后全盘跑一遍找到最大的值使得每组积木都有相应的值 要存n组积木,由于n include include using namespace std; const int MAXN = 1e2+5; int n,ans; bool dp[MAXN][MAXN MA ...
分类:
其他好文 时间:
2020-03-21 09:25:45
阅读次数:
55
转自 https://www.bilibili.com/video/av34962180?t=1435&p=2 77,给定两个整数 n 和 k,返回 1 ... n 中所有可能的 k 个数的组合。 vector<vector<int> >ans; vector<vector<int>> combin ...
分类:
其他好文 时间:
2020-03-21 00:06:58
阅读次数:
73
1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 int maxi,R,pos,ans_pos,p[2000007]; 5 string str,ans_str,tmp; 6 void ...
分类:
其他好文 时间:
2020-03-20 12:44:44
阅读次数:
68
A. Two Rabbits 题意: 求左右两只分别能跳a,b距离的兔子,是否能在同一点,如果能求最短时间。 cpp include using namespace std; string s[101]; int p[101]; string ans; int main(){ int t,n; ci ...
分类:
其他好文 时间:
2020-03-18 15:25:59
阅读次数:
61
1.二叉树遍历的迭代模板 "前序遍历" 前序遍历的顺序是根左右,为了防止破坏树结构,我们将root地址给了tmp,开始只要tmp不空,他一定是根节点或左节点,因为在if语句中我们令tmp = tmp left,因此在if语句中我们把相应的val值给了ans,如果tmp空了,说明左节点遍历完了,我们找 ...
分类:
编程语言 时间:
2020-03-16 09:25:36
阅读次数:
55
"Codeforces961F k substrings" 题意 给一个字符串$s$,求所有的 s[i,n?i+1] 的 border 长度(最长的前缀等于后缀),并且要求长度是奇数,如果没有,输出 1 题解 可以发现,$ans[i+1] \geq ans[i] 1$,得到$ans[i] \leq ...
分类:
其他好文 时间:
2020-03-15 17:31:21
阅读次数:
66