码迷,mamicode.com
首页 >  
搜索关键字:ansible playbook node    ( 29958个结果
11111
#include #include using namespace std;const int maxn = 250000 + 10;int tot;struct Node{ Node * ch[26],*f; int l;} nd[maxn l = last->l + 1; last = p; f...
分类:其他好文   时间:2014-08-14 00:57:37    阅读次数:236
hdu 1520 Anniversary party
如果选了节点u,则不能选他的父节点和子节点,每个点有一个权值,求最大权值。#include #include #include using namespace std;#define maxn 6100#define maxm 15000struct Node{ int u,v,next;}e...
分类:其他好文   时间:2014-08-14 00:56:37    阅读次数:163
hdoj 1312 Red and Black 【BFS】
题意:一共有四个方向,从’@‘出发,找能到达‘.’的个数, #是不能通过的. 策略:广搜。 这道题属于最简单的bfs了。 代码: #include #include #include using std::queue; bool vis[25][25]; char s[25][25]; int n, m; int ans = 0; struct node{ int x, y; }; no...
分类:其他好文   时间:2014-08-13 22:31:17    阅读次数:301
hdoj 1203 I NEED A OFFER! 【另类01背包】【概率背包】
题意:。。。 策略:动态规划。 因为是求至少能得到一个offer的概率,那我们可以反着求,求得不到一个offer的概率,最后用1减去就好了. 代码: #include #include double dp[10010]; struct node{ int a; double b; }s[10010]; int main() { int n, m, i, j; ...
分类:其他好文   时间:2014-08-13 22:30:47    阅读次数:229
反射原理读取对象属性并设置属性值
Dictionary dicNodes = new Dictionary(); foreach (XmlNode node in nodes.ChildNodes) { if (node.NodeType==XmlNodeType.Element) ...
分类:其他好文   时间:2014-08-13 18:14:36    阅读次数:166
【Leetcode长征系列】Balanced Binary Tree
原题: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never...
分类:其他好文   时间:2014-08-13 15:03:31    阅读次数:261
HDU 3046
http://acm.hdu.edu.cn/showproblem.php?pid=3046典型的最小割模型#include #include #include using namespace std ;const int INF=0xfffffff ;struct node{ int s,...
分类:其他好文   时间:2014-08-13 14:20:36    阅读次数:199
leetcode 刷题之路 81 Populating Next Right Pointers in Each Node
Populate each next pointer to point to its next right node. 二叉树的结构体里增加了next指针,编写程序,将二叉树里每个节点的next指针指向它右边的节点。...
分类:其他好文   时间:2014-08-13 13:16:36    阅读次数:210
POJ 1988 Cube Stacking(转)
这道题的思路,就是每次记下该点到父结点的个数,并记录下其下的结点个数。之后,每次"C"时,将总的减去它所压的方块,即答案!!!(也是参考别人的~-?)#include#includeusing namespace std;#define max 30010struct node{ int paren...
分类:其他好文   时间:2014-08-13 12:57:16    阅读次数:174
Clone Graph
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.思路:使用BFS遍历无向图。使用map记录原始节点和新节点的地址映射,使用set记录已经完成复制操作的节点地址...
分类:其他好文   时间:2014-08-13 00:52:24    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!