码迷,mamicode.com
首页 >  
搜索关键字:reversible primes    ( 347个结果
PAT1015. Reversible Primes
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re...
分类:其他好文   时间:2015-02-21 09:42:17    阅读次数:195
SPOJ PGCD(莫比乌斯反演)
传送门:Primes in GCD Table题意:给定两个数和,其中,,求为质数的有多少对?其中和的范围是。分析:这题不能枚举质数来进行莫比乌斯反演,得预处理出∑υ(n/p)(n%p==0).#pragma comment(linker,"/STACK:1024000000,1024000000"...
分类:其他好文   时间:2015-02-21 01:22:36    阅读次数:252
1015. Reversible Primes (20)
Areversibleprimeinanynumbersystemisaprimewhose"reverse"inthatnumbersystemisalsoaprime.Forexampleinthedecimalsystem73isareversibleprimebecauseitsrevers...
分类:其他好文   时间:2015-01-30 07:52:34    阅读次数:145
HDU 5104 Primes Problem(数学)
HDU 5104 Primes Problem(数学)...
分类:其他好文   时间:2015-01-25 11:13:01    阅读次数:170
hdu 5104 Primes Problem (素数 打表 水)
http://acm.hdu.edu.cn/showproblem.php?pid=5104#include#include#include#include#includeusing namespace std;int isp[10000+100];int prime[10000];int coun...
分类:其他好文   时间:2015-01-18 15:42:54    阅读次数:161
UVa 1213 (01背包变形) Sum of Different Primes
题意:选择K个质数使它们的和为N,求总的方案数。分析:虽然知道推出来了转移方程, 但还是没把代码敲出来,可能基本功还是不够吧。d(i, j)表示i个素数的和为j的方案数,则 d(i, j) = sigma d(i-1, j-p[k]) ,其中p[k]表示第k个素数注意递推的顺序是倒着推的,否则会计算...
分类:其他好文   时间:2015-01-05 21:46:55    阅读次数:223
newLISP 多进程与多核CPU
newLISP实现了Cilk API, 可以将多个同时运行的进程执行在多处理器或者多核的CPU架构上,已达到并行节省运行时间的目的。使用spawn和sync函数可以很快的实现。下面是来自newLISP官方文档的例子:#!/usr/bin/newlisp ; calculate primes in a range (define (primes from to) (local (plist)...
分类:系统相关   时间:2014-12-20 14:17:19    阅读次数:207
sicily 1259 Sum of Consecutive Primes
此题首先为利用筛选法求得10000以内的素数,然后对于输入的每一个数字,依次以小于它的连续素数相加,相等则种类数加一,返回,换另一个素数开始往后继续相加进行这个过程,最后输出种类数。1259. Sum of Consecutive PrimesConstraintsTime Limit: 1 sec...
分类:其他好文   时间:2014-12-08 21:18:22    阅读次数:228
BestCoder Round #18
1001 Primes Problem打个10^4的素数表,枚举前两个搞一下就好了。#include#include#include#include#include#include#include#includeusing namespace std;const int n = 10000;int ...
分类:其他好文   时间:2014-11-26 22:15:06    阅读次数:262
素数筛选 HDU 4715
打表,把所有的素数找出来,并且还要把那些数是素数标记下 Difference Between Primes Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2281    Accepted Submission(s): 642 ...
分类:其他好文   时间:2014-11-24 22:34:56    阅读次数:276
347条   上一页 1 ... 29 30 31 32 33 ... 35 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!