码迷,mamicode.com
首页 >  
搜索关键字:poj 3348 cows    ( 21218个结果
POJ 2478 Farey Sequence 筛选法求欧拉函数
题目来源:POJ 2478 Farey Sequence 题意:输入n 求 phi(2)+phi(3)+phi(4)+...+phi(n) 思路:用类似筛法的方式计算phi(1), phi(2), ..., phi(n) 再求前缀和 #include #include #include //欧拉phi函数 const int maxn = 1000010; typedef long...
分类:其他好文   时间:2014-05-14 01:05:22    阅读次数:323
poj 1007 DNA Sorting
DNA Sorting Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 80359   Accepted: 32327 Description One measure of ``unsortedness'' in a sequence is the number of ...
分类:其他好文   时间:2014-05-13 23:34:18    阅读次数:303
poj 1066 Treasure Hunt
http://poj.org/problem?id=1066大意; 问在房间中有一份宝藏,但是房间中有一些隔板,问最少需要通过多少隔板思路: 链接宝藏与爆破地点,枚举每一条直线寻找最少破坏的隔板。。 1 #include 2 #include 3 #include 4 using na...
分类:其他好文   时间:2014-05-13 22:33:47    阅读次数:372
poj 2096
1 /** 2 程序员调bug思路: 一共有四种情况,1、 1个原有的bug 在原有的分类中2、 1个原有的bug 在新的分类中3、 1个新的bug 在原有的分类中4、 1个新bug 在新的分类中 3 **/ 4 #include 5 #include 6 using namespace s...
分类:其他好文   时间:2014-05-13 22:07:54    阅读次数:277
poj 1423 Big Number
1 /** 2 斯特林(Stirling)公式: 3 4 求 n! 的位数 5 6 ceil函数的作用是求不小于给定实数的最小整数。 7 **/ 8 #include 9 #include 10 #include 11 using namespace std;12 const doubl...
分类:其他好文   时间:2014-05-13 22:06:51    阅读次数:253
poj 1715 Hexadecimal Numbers 排列组合
1 /** 2 大意: 给定16进制数的16个字母,,求第k大的数,,要求数的长度最大为8.,并且每个数互不相同。 3 思路: 从高到低挨个枚举,每一位能组成的排列数 ,拿最高位来说,能做成的排列数为15*A(15,len-i) 4 第二位 A(14,len-2)。。这样就可以...
分类:其他好文   时间:2014-05-13 21:58:38    阅读次数:402
poj 3608 Bridge Across Islands 两凸包间最近距离
1 /** 2 旋转卡壳,, 3 **/ 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 const double eps = 1e-8; 11 struct point {...
分类:其他好文   时间:2014-05-13 21:35:05    阅读次数:374
poj 3335 /poj 3130/ poj 1474 半平面交 判断核是否存在 / poj1279 半平面交 求核的面积
1 /*************** 2 poj 3335 点序顺时针 3 ***************/ 4 #include 5 #include 6 #include 7 using namespace std; 8 const double eps = 1e-8;...
分类:其他好文   时间:2014-05-13 21:33:59    阅读次数:413
POJ 3090 Visible Lattice Points 法雷级数
题目来源:POJ 3090 Visible Lattice Points 题意:哪些点可以看到 思路: F1: 0/1 1/1 F2: 0/1 1/2 1/1 F3: 0/1 1/3 1/2 2/3 1/1 F4: 0/1 1/4 1/3 1/2 2/3 3/4 1/1 F5: 0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1 F6:...
分类:其他好文   时间:2014-05-13 08:35:54    阅读次数:324
POJ 1379 模拟退火法
Run Away Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 5631   Accepted: 1728 Description One of the traps we will encounter in the Pyramid is located in the ...
分类:其他好文   时间:2014-05-13 07:53:49    阅读次数:362
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!