码迷,mamicode.com
首页 >  
搜索关键字:divide and conquer    ( 1165个结果
枚举类+抽象方法+内部类
package Class_study; public enum Operation {//枚举类+内部类+抽象函数 Divide{ public double eval(double x,double y){ return x/y; } },Pluse{ public double eval(do
分类:其他好文   时间:2016-03-02 13:01:38    阅读次数:115
遍历n个节点能够形成的所有二叉树
帮师兄做的一个问题,就是求对n个不同节点能够形成所有的二叉树的形式,不考虑旋转对称性和同构。 问题描述:给定n个节点,查看能够有多少种不同的二叉树形成,并输出出来 算法描述:使用最基本的“分治法“(Divide and Conquer)思想,任选一个节点作为根节点,将剩余节点组成的集合进行分割(Pa
分类:其他好文   时间:2016-02-23 20:39:05    阅读次数:190
binary search
The implementation of binary search is not complicated, but it is a vivid illustration of the power of divide-and-conquer. Here is the code 1 int bina
分类:其他好文   时间:2016-02-20 07:03:12    阅读次数:171
LeetCode - 29. Divide Two Integers
29. Divide Two Integers Problem's Link ---------------------------------------------------------------------------- Mean: 略 analyse: 略 Time complexity
分类:其他好文   时间:2016-02-19 18:59:57    阅读次数:117
Protocol Framework - SNMP Tutorial
30.4 Protocol Framework TCP/IP network management protocols2 divide the management problem into two parts and specify separate standards for each part
分类:其他好文   时间:2016-02-14 19:44:40    阅读次数:192
HDU 5364 Distribution money
Problem Description AFA want to distribution her money to somebody.She divide her money into n same parts.One who want to get the money can get more t
分类:其他好文   时间:2016-02-14 14:08:31    阅读次数:230
单元加
已知输入整数14时,运行结果如下,试根据规律编写程序 #include <stdio.h> int t;//标记i的重复次数 //void divide(int i,int number) //{ //int k,n=number; //while(n>i) //{ // n=n-i; // if(
分类:其他好文   时间:2016-02-13 21:54:11    阅读次数:229
Divide Two Integers
Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. Subscribe to see which companies asked
分类:其他好文   时间:2016-02-05 01:38:34    阅读次数:132
UVA 10256 The Great Divide (凸包,多边形的位置关系)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=34148 【思路】 凸包 求出红蓝点的凸包,剩下的问题就是判断两个凸包是否相离。 需要确定两点: 1) 凸包上线段是否相交->相交 2) 凸包上的点是否包含在另一个凸包
分类:其他好文   时间:2016-02-01 20:24:30    阅读次数:210
Divide and conquer:Sumsets(POJ 2549)
数集 题目大意:给定一些数的集合,要你求出集合中满足a+b+c=d的最大的d(每个数只能用一次) 这题有两种解法, 第一种就是对分,把a+b的和先求出来,然后再枚举d-c,枚举的时候输入按照降序搜索就好,一旦d满足条件就是最大的了,另外判断不重复存一下位置就好,时间复杂度0(n^2*logn) 1
分类:其他好文   时间:2016-02-01 09:31:50    阅读次数:329
1165条   上一页 1 ... 73 74 75 76 77 ... 117 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!