码迷,mamicode.com
首页 >  
搜索关键字:not find    ( 24186个结果
UVA - 11898 Killer Problem
Description  Killer Problem  You are given an array of N integers and Q queries. Each query is a closed interval [l, r]. You should find the minimum absolute difference betw...
分类:其他好文   时间:2014-08-11 12:01:22    阅读次数:213
CakePHP 2.5 使用Redis缓存Paginator的数据
本身的Paginator无法缓存 , 直接修改源代码方便缓存/lib/Cake/Controller/Component/PaginatorComponent.php定位到196行和大约215行/*修改一下代码源代码仅为$results = $object->find($type, array_me...
分类:Web程序   时间:2014-08-11 11:49:42    阅读次数:265
并查集 模板
const int MAX=1010; //元素个数的最大值,根据题目修改int p[MAX];void init(int n) //n为实有元素个数{ for (int i=1; i<=n; i++) p[i]=i; }int find(int x) //查找{ if (x==p[x]) retu...
分类:其他好文   时间:2014-08-10 21:21:50    阅读次数:258
Hat’s Words(字典树)
Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the hat’s words in a dictionary....
分类:其他好文   时间:2014-08-10 18:40:10    阅读次数:232
UVA - 10312 Expression Bracketing
Description Problem A Expression Bracketing Input: standard input Output: standard output Time Limit: 1 second Memory Limit: 32 MB   Inthis problem you will have to find in how many ways ...
分类:其他好文   时间:2014-08-10 15:47:00    阅读次数:247
Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:其他好文   时间:2014-08-10 15:33:50    阅读次数:166
Given a tree, find the node with the minimum sum of distances to other nodes
O(n) complexity, have a traversal for the tree. Get the information of all children, then traverse the tree again.  #include #include #include #include using namespace std; class Node { pub...
分类:其他好文   时间:2014-08-10 13:00:30    阅读次数:238
xtu summer individual 6 E - Find Metal Mineral
Find Metal MineralTime Limit: 1000msMemory Limit: 65768KBThis problem will be judged onHDU. Original ID:400364-bit integer IO format:%I64d Java class ...
分类:其他好文   时间:2014-08-10 12:42:00    阅读次数:230
hdu 1878 欧拉回路 (欧拉回路)
//1.联通图 2.顶点度数都为偶数 ,则存在欧拉回路。 # include # include # include using namespace std; int father[1010]; int vis[1010][1010],du[1010]; int find(int x) { if(father[x]==x) return x; return f...
分类:其他好文   时间:2014-08-10 10:25:30    阅读次数:218
HDOJ 4003 Find Metal Mineral
题意: 一棵有权树,从根结点中放入 K 个机器人,求用这 K 个机器人遍历所有的结点最少的权值和。 思路: 1. dp[u][i] 表示给以 u 为根节点的子树放 i 个机器人,遍历其子树所需要的最小权值。 2. 关键在于 dp[u][0] 的理解,表示:最后停留在以 u 为根节点的子树下 0 个机器人,并且遍历了 u 子树的最小权值和。 3. 下面的步骤就变成和分组...
分类:其他好文   时间:2014-08-10 10:24:50    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!