码迷,mamicode.com
首页 >  
搜索关键字:uva 10200 prime tim    ( 11153个结果
hdu 1239 找素数对
题意:给你一个大于4的整数m和一个真分数a/b,求最佳素数对p、q,使得a/b#includeusing namespace std; int main() { int prime[2000],k; int num[10001]; int i,l; int ...
分类:其他好文   时间:2014-05-01 14:43:18    阅读次数:325
uva 11324
Problem B: The Largest CliqueGiven a directed graphG, consider the following transformation. First, create a new graphT(G)to have the same vertex set ...
分类:其他好文   时间:2014-05-01 14:09:34    阅读次数:357
UVA 10891 Game of Sum(DP)
This is a two player game. Initially there areninteger numbers in an array and playersAandBget chance to take them alternatively. Each player can take...
分类:其他好文   时间:2014-04-30 20:34:38    阅读次数:519
CSU 1425 NUDT校赛 I题 Prime Summation
这个题本来有希望在比赛里面出了的当时也想着用递推 因为后面的数明显是由前面的推过来的但是在计算的时候 因为判重的问题 。。。很无语。我打算用一个tot[i]来存i的总种树,tot[i]+=tot[j]//j为可以由j推到i的一系列数,但这样是不对的,会产生大量重复计算。。。看了下标程才发现要用二维来...
分类:其他好文   时间:2014-04-30 15:16:28    阅读次数:382
uva 11374
Problem D: Airport ExpressIn a small city called Iokh, a train service,Airport-Express, takes residents to the airport more quickly than other transpo...
分类:其他好文   时间:2014-04-30 13:53:23    阅读次数:347
uva 10917
Problem C: A Walk Through the ForestJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To rel...
分类:其他好文   时间:2014-04-29 17:21:46    阅读次数:368
Carmichael Numbers(Uva 10006)
Carmichael Numbers An important topic nowadays in computer science is cryptography. Some people even think that cryptography is the only important fi....
分类:其他好文   时间:2014-04-29 16:31:45    阅读次数:504
hdu 1492
好高兴 一上午做了2个题 题意:求素因子只有2 3 5 7 数 约束的个数 我用的时搜索计数法 感觉还应该有比较不错的组合数学方法#includeusing namespace std;__int64 dmax;int prime[4];void dfs(int t){ if(t>=4) { ...
分类:其他好文   时间:2014-04-29 11:21:47    阅读次数:278
hdu 1431
第一次打表一言难尽 注意表的范围 因为打表 数组长度不好计算算 要有个结尾标志#includeusing namespace std;int prime[1000]={5,7,11,101,131,151,181,191,313,353,373,383,727,757,787,797,919,9.....
分类:其他好文   时间:2014-04-29 10:27:47    阅读次数:471
UVA 948 数的斐波那契进制表示
每个正整数都可以分解成斐波那契数列中的几个数相加…… 从大到小贪心法就可以了…… #include #include #include #include #include #include #include #include #include #include #include #include #include #define PI acos(-1.0) #defi...
分类:其他好文   时间:2014-04-27 21:23:04    阅读次数:371
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!