码迷,mamicode.com
首页 >  
搜索关键字:divide    ( 1127个结果
(0染色判定二分图) hdu 4751
J -Divide GroupsTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 4751Appoint description:DescriptionThis year...
分类:其他好文   时间:2015-04-16 21:34:23    阅读次数:133
[hihoCoder] #1096 : Divided Product
时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given two positive integers N and M, please divide N into several integers A1, A2, ..., Ak (k >= 1), so that:1. 0 ....
分类:其他好文   时间:2015-04-13 18:50:01    阅读次数:170
“《算法》第4版第2章‘排序’”:归并排序
归并排序(Merge Sort,台湾译作:合并排序)是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and Conquer)的一个非常典型的应用。 归并操作(Merge),也叫归并算法,指的是将两个已经排序的序列合并成一个序列的操作。归并排序算法依赖归并操作。归并排序...
分类:编程语言   时间:2015-04-11 23:53:09    阅读次数:210
leetcode:Divide Two Integers
class Solution { public: int divide(int dividend, int divisor) { long long div = dividend,dis = divisor; div = abs(div); dis = abs(dis); long long res = 0; w...
分类:其他好文   时间:2015-04-03 23:55:31    阅读次数:247
YTUOJ-Pseudoprime numbers
Description Fermat's theorem states that for any prime number p and for any integer a > 1, ap == a (mod p). That is, if we raise a to the pth power and divide by p, the remainder is a. Some (but ...
分类:其他好文   时间:2015-04-03 09:33:09    阅读次数:93
第2章 熟悉Eclipse开发工具:加减乘除,和差积商的英文写法
加减乘除表示运算:plus minus multiply divide和差积商表示运算结果:sum difference product quotient
分类:系统相关   时间:2015-04-02 14:37:42    阅读次数:243
拒绝switch,程序加速之函数指针数组
先看一个使用switch语句的程序: #include #include //加法 int add(int a,int b) { return a+b; } //减法 int subtract(int a,int b) { return a-b; } //乘法 int multi(int a,int b) { return a*b; } //除法 int divide(int ...
分类:编程语言   时间:2015-04-02 13:27:17    阅读次数:195
[leetcode] Divide Two Integers
Divide Two IntegersDivide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.思路:类似二分查找算法,只不过我们做的是对...
分类:其他好文   时间:2015-04-02 13:10:11    阅读次数:114
HDU 4751 Divide Groups(判断是否为二分图)
#include #include #include #include #include #include #include #include #define LL long long #define FOR(i, x, y) for(int i=x;i<=y;i++) using namespace std; const int MAXN = 100 + 10; struct E...
分类:其他好文   时间:2015-04-02 11:42:47    阅读次数:131
算法中的递归分析和分治法的原理
分析递归算法三种方法替换法、迭代法、通用法(master method)作用:分析递归算法的运行时间分治算法将一个问题分解为与原问题相似但规模更小的若干子问题,递归地解这些子问题,然后将这些子问题的解结合起来构成原问题的解。这种方法在每层递归上均包括三个步骤:divide(分解):将问题划分为若干个...
分类:编程语言   时间:2015-03-31 21:50:49    阅读次数:225
1127条   上一页 1 ... 89 90 91 92 93 ... 113 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!