码迷,mamicode.com
首页 >  
搜索关键字:calculate prime s    ( 3428个结果
A very small C program on prime decomposition and some thoughts on study
Today, I spent some time on learning how to program using C programming language, and I now have some thoughts to share. Firstly, I found it very bo.....
分类:其他好文   时间:2014-10-17 01:10:03    阅读次数:284
Sicily 1381. a*b
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionGive two positive integers a and b, please help us calculate a*b.InputThe first line of t...
分类:其他好文   时间:2014-10-16 14:06:42    阅读次数:135
Uva 552 Prime Ring Problem
题目链接:Uva 552思路: 时间限制为3s,数据较小,使用深度搜索查找所有的解。代码:#include #include using namespace std;const int MAX_N = 20;int n;int A[MAX_N], vis[MAX_N];int is_prime( ....
分类:其他好文   时间:2014-10-16 03:52:51    阅读次数:211
HDU 4756 Install Air Conditioning(次小生成树)
题目大意:给你n个点然后让你求出去掉一条边之后所形成的最小生成树。 比较基础的次小生成树吧。。。先prime一遍求出最小生成树,在dfs求出次小生成树。 Install Air Conditioning Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total ...
分类:其他好文   时间:2014-10-15 21:53:21    阅读次数:301
JAVA中的策略模式strategy
原文出自:http://ttitfly.iteye.com/blog/1364671. 以一个算术运算为例,传统做法为:java 代码package org.common; public class Calculate { public String getResu...
分类:编程语言   时间:2014-10-15 13:17:30    阅读次数:214
POJ1811_Prime Test【Miller Rabin素数测试】【Pollar Rho整数分解】
题目大意:T组数据,对于输入的N,若N为素数,输出“Prime”,否则输出N的最小素因子 思路:因为N的规模为2^54所以普通的素性判断果断过不了。要用Miller Rabin素数测试来做。 而若N不为素数,则需要对N进行素因子分解。因为N为大数,考虑用Pollar Rho整数分解来做。...
分类:其他好文   时间:2014-10-15 12:49:30    阅读次数:225
HDU 1058 Humble Numbers(dp)
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first...
分类:其他好文   时间:2014-10-14 23:41:13    阅读次数:266
orientation of a given circle
sqwswwEEEeUntitled Document 复习提纲 stereographic projection (definition and the way to find a projecting point) calculate square root for a given complex number triangle inequality differentiatio...
分类:其他好文   时间:2014-10-14 14:01:29    阅读次数:412
Codeforces Round #272 (Div. 1) A. Dreamoon and Sums(数论)
题目链接Dreamoon loves summing up something for no reason. One day he obtains two integersaandboccasionally. He wants to calculate the sum of allniceinteg...
分类:其他好文   时间:2014-10-13 23:10:27    阅读次数:221
hdu 2136 (Largest prime factor)就是简单 的筛选素数法
Largest prime factor Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7009    Accepted Submission(s): 2482 Problem Description Every...
分类:其他好文   时间:2014-10-13 13:10:47    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!