码迷,mamicode.com
首页 >  
搜索关键字:divide    ( 1127个结果
LintCode-Backpack
Given n items with size A[i], an integer m denotes the size of a backpack. How full you can fill this backpack?NoteYou can not divide any item into sm...
分类:其他好文   时间:2014-12-25 06:37:21    阅读次数:175
leet code -- Divide Two Integers
leet code -- Divide Two Integers...
分类:其他好文   时间:2014-12-17 14:42:55    阅读次数:188
大数的加减乘除
= =用c做大数的题真是够够的了,跟着男神学了一下用Java做简单的加减乘除(即add,substract,multiply和divide),下面的代码是多组大数加法的代码。import java.math.BigInteger;import java.util.*;public class Mai...
分类:其他好文   时间:2014-12-17 09:06:10    阅读次数:132
Leetcode-Divide Two Integers
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.Solution: 1 public class Solution { 2 .....
分类:其他好文   时间:2014-12-16 07:40:01    阅读次数:173
UVa 10375 (唯一分解定理) Choose and divide
题意:求组合数C(p, q) / C(r, s)结果保留5为小数。分析:先用筛法求出10000以内的质数,然后计算每个素数对应的指数,最后再根据指数计算答案。 1 #include 2 #include 3 #include 4 5 const int maxn = 10000; 6 int...
分类:其他好文   时间:2014-12-14 07:02:25    阅读次数:145
csapp2e homework 2.77
#include #define debug_print(x) printf(#x"\t%d\n",x) int divide_power2(int x,int k) { int w = sizeof(int) <> (w - 1) ; int result; ( sign == 0 && (result = (x >> k)) ) || ( sig...
分类:移动开发   时间:2014-12-11 22:30:47    阅读次数:328
MyMath四原则
// // Copyright (c) 2014级软件1班 // All rithts reseved. // 作者:A36 黄阿德 // 完成日期:2014年12月10日 // // 问题描述:创建一个程序求两个整数的加、减、乘、除 // 输入描述:从键盘上分别输入两个数 number1、number2 // 输出描述:分别输出 Add,SubStract,Multiply,Divide的结果 ...
分类:其他好文   时间:2014-12-10 21:18:24    阅读次数:231
除法计算-C++-非*,/,%运算
原理: m = x1*2^y1 + x2*2^y2…… 要点:    >优先级比+,-低。 顺便插一下优先级图片: 只考虑正数情况下: int divide(int x,int y) { if(x < y) return 0; int sum = 0; int te = y< te) { ...
分类:编程语言   时间:2014-12-08 23:09:19    阅读次数:400
UVA 10256 The Great Divide(凸包划分)
The Great DivideInput:standard inputOutput:standard outputTime Limit:8 secondsMemory Limit:32 MBSomewhere inGaul, there is a little village very like ...
分类:其他好文   时间:2014-12-07 17:36:32    阅读次数:226
算法 - 归并排序(C#)
/* * MergeSorter.cs - by Chimomo * * 归并排序是建立在归并操作上的排序算法,该算法是分而治之策略(Divide and Conquer)的一个非常典型的应用。 * * 归并操作的基本原理: * 1、申请空间,使其大小为两个已经排序序列之和,该空间用来存放归并后的序列。 * 2、设置两个指针,最初位置分别为两个已经排序序列的起始位置。 * 3、...
分类:编程语言   时间:2014-12-03 19:21:53    阅读次数:153
1127条   上一页 1 ... 96 97 98 99 100 ... 113 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!