码迷,mamicode.com
首页 >  
搜索关键字:uva 10200 prime tim    ( 11153个结果
uva 11133 - Eigensequence(dp)
题目链接:uva 11133 - Eigensequence题目大意:给定一个序列a,能够确定一个序列b,要求:1)b[1]=a[1]2)a[j?1]1的时候假设对于每一个ai=bi,则称b序列为Eigensequence序列。如今给定a1和an,问有多少个Eigensequence序列。解题思路:...
分类:其他好文   时间:2014-06-25 23:31:26    阅读次数:272
(转载)关于gcd的8题
发现其实有关gcd的题目还是挺多的,这里根据做题顺序写出8题。[bzoj2818: Gcd] gcd(x,y)=质数, 1#include const int MAXN = 10000001;int n, primes;long long prime[MAXN], phi[MAXN];bool co...
分类:其他好文   时间:2014-06-25 22:12:36    阅读次数:317
UVa 10061 - How many zero's and how many digits ?
题目:给你一个数字n,一个数字b,问n!转化成b进制后的位数...
分类:其他好文   时间:2014-06-22 20:23:39    阅读次数:178
uva 10795 - A Different Task (递归+状态转移)
题目链接:uva 10795 - A Different Task 题意: 新汉若塔问题,有n个盘子,放在3个盘子上,给你一个初始状态和一个结束状态,问你最小步数怎样到达。 思路: 递归+状态转移,直接从初态到末态好像不是那么好办,对最大的一块n,首先肯定要把他放在末态的位置上,假设开始在1号位置,要放到3号位置,那么必须先到达这个状态s:1~n-1必须都从大到小放在2上面...
分类:其他好文   时间:2014-06-22 19:15:36    阅读次数:187
UVA Oil Deposits
题目如下: Oil Deposits  The GeoSurvComp geologic survey company is responsible for detectingunderground oil deposits. GeoSurvComp works with one large rectangularregion of land a...
分类:其他好文   时间:2014-06-22 14:36:31    阅读次数:232
C++STL之set容器及stream类
首先讲stream流类 头文件#include 其功能是进行不同类型之间的转换,跟C语言 fscanf 和 fprintf 作用是相同的,但是比C语言的更简便更好用。 用法很简单 #include #include #include int main() { std::stringstream stream; std::string result; in...
分类:编程语言   时间:2014-06-22 09:05:45    阅读次数:295
STL 队列模板实现
C++ Prime确实有点难啊!看了好久都没弄清楚,一点点慢慢来。 #include #include #include template class Queue; //function template declaration must precede friend declaration in QueueItem template std::ostream& operator&...
分类:其他好文   时间:2014-06-21 22:49:01    阅读次数:184
uva 11488 - Hyper Prefix Sets(字典树)
数据结构-字典树...
分类:其他好文   时间:2014-06-21 21:28:59    阅读次数:254
UVa 10828 Back to Kernighan-Ritchie 高斯消元+概率DP
题目来源:UVa 10828 Back to Kernighan-Ritchie 题意:从1开始 每次等概率从一个点到和他相邻的点 有向 走到不能走停止 求停止时每个点的期望 思路:写出方程消元 方程有唯一解 多解 无解的情况 有环 一直再环里无法停止算无穷大 从1不能到的点期望为0 #include #include #include #include #include usin...
分类:其他好文   时间:2014-06-21 19:51:55    阅读次数:338
Uva227.Puzzle
题目连接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=163#ProblemVerdictLanguageRun TimeSubmission Date1...
分类:其他好文   时间:2014-06-20 20:23:12    阅读次数:365
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!