码迷,mamicode.com
首页 >  
搜索关键字:bear and prime numbe    ( 2904个结果
Bear and Floodlight 状态压缩DP啊
Bear and FloodlightTime Limit:4000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64u[Submit] [Go Back] [Status]DescriptionOne day a bear lived on th...
分类:其他好文   时间:2014-08-11 00:14:51    阅读次数:275
nyoj CO-PRIME 莫比乌斯反演
CO-PRIME时间限制:1000ms | 内存限制:65535KB难度:3描述This problem is so easy! Can you solve it?You are given a sequence which contains n integers a1,a2……an, your t...
分类:其他好文   时间:2014-08-10 10:18:40    阅读次数:250
NYOJ 1066 CO-PRIME(数论)
CO-PRIME 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 This problem is so easy! Can you solve it? You are given a sequence which contains n integers a1,a2……an, your task is to find how man...
分类:其他好文   时间:2014-08-09 18:46:38    阅读次数:244
POJ2728 最小比率生成树/0-1分数规划/二分/迭代(迭代不会)
用01分数规划 + prime + 二分 竟然2950MS惊险的过了QAQ前提是在TLE了好几次下过的 = =题目意思:有n个村庄,村庄在不同坐标和海拔,现在要对所有村庄供水,只要两个村庄之间有一条路即可,建造水管距离为坐标之间的欧几里德距离,费用为海拔之差,现在要求方案使得费用与距离的比值最小,很...
分类:其他好文   时间:2014-08-08 12:27:35    阅读次数:315
POJ 3292 Semi-prime H-numbers(数)
题意 所有可以表示为4*k+1(k>=0)的数都称为“H数” 而在所有“H数”中只能被1和自身整除的H数称为“H素数“ 能表示成两个”H素数“积的数又称为”Semi-prime H数“ 输入n 求1到n之间有多少个”Semi-prime H数“; 方法 先打个H素数表 再用H素数表中的数依次相乘 得到的数都标记 再用一个数组保存每个数以内的标记数 输入n后直接读数组就行了...
分类:其他好文   时间:2014-08-07 23:11:35    阅读次数:265
POj 3126 Prime Path
来源:http://poj.org/problem?id=3126 Prime Path Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11384   Accepted: 6453 Description The minister...
分类:其他好文   时间:2014-08-07 13:19:20    阅读次数:320
poj 2689 Prime Distance 【数论】【筛法求素数】
筛法求素数扩展 经典题目...
分类:其他好文   时间:2014-08-06 19:17:02    阅读次数:275
Light OJ 1356 Prime Independence 最大独立集+素数筛选
题目来源:Light OJ 1356 Prime Independence 题意:给你n个数 选出最多的数构成一个集合使得任何2个数不是另外一个数的质数倍 x!=k*y  思路:矛盾的2个数连边 并且所有数分成质因子数为奇数和偶数两部分 以质因子奇偶不同构建二分图 同奇 同偶的数一定不是另外一个数的质数倍 判断矛盾 首先对每个数因子分解 例如x 有a1个p1质因子 a2个p2质因子...an...
分类:其他好文   时间:2014-08-06 19:09:32    阅读次数:303
Prime Distance(二次筛素数)
Description The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the qu...
分类:其他好文   时间:2014-08-06 19:06:42    阅读次数:319
HDU4911:Inversion
Problem Description bobo has a sequence a1,a2,…,an. He is allowed to swap two adjacent numbers for no more than k times. Find the minimum number of inversions after his swaps. Note: The numbe...
分类:其他好文   时间:2014-08-06 14:51:38    阅读次数:177
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!