码迷,mamicode.com
首页 >  
搜索关键字:uva 10200 prime tim    ( 11153个结果
uva----11729 Commando war (突击战争)
GCommando WarInput:Standard InputOutput:Standard Output“Waiting for orders we held in the wood, word from the front never cameBy evening the sound of ...
分类:其他好文   时间:2014-05-20 00:46:38    阅读次数:304
oracle使用LEFT JOIN关联产生的问题在查询结果中使用CASE WHEN 无法判断
oracle使用LEFT JOIN关联产生的问题在查询结果中使用CASE WHEN 无法判断查询方式一: 1 SELECT 2 CASE WHEN (SELECT CAST(SUM(CASE 3 WHEN (ALLOCABLE_PRIME_CURRENCY_VALUE IS NULL AND ST....
分类:数据库   时间:2014-05-18 20:08:35    阅读次数:1129
CSU 1425 Prime Summation
原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1425 DP题。 f[i][j]表示当前数字为i,分解式中最大质数为j的方案数,那么,状态转移方程为: f[i][j] = sum(f[i-j][k]) 其中...
分类:其他好文   时间:2014-05-17 20:41:17    阅读次数:296
uva 10391 Compound Words (字符串-hash)
uva 10391 Compound Words (字符串-hash) 题目大意: 有一堆按照字典序排好的字符串,问你有多少字符串是由其它两个字符串组成。 解题思路: 如果用两个字符串拼接看拼接好的字符串是否在字典中,一定会超时。 我们可以逆向,由于字符串的长度不是很长,所以把一个字符串拆为两个字符串看这两个字符串是否都在字典中即可 解题代码一: 判断字符串是否在字典中,可以用STL set,也是轻松AC 解题代码二: 判断字符串是否在字典中,可以用hash,于是手写ha...
分类:其他好文   时间:2014-05-16 02:48:12    阅读次数:377
POJ 2689 Prime Distance 素数筛选法应用
题目来源:POJ 2689 Prime Distance 题意:给出一个区间L R 区间内的距离最远和最近的2个素数 并且是相邻的 R-L 思路:一般素数筛选法是拿一个素数 然后它的2倍3倍4倍...都不是 然后这题可以直接从2的L/2倍开始它的L/2+1倍L/2+2倍...都不是素数 首先筛选出一些素数 然后在以这些素数为基础 在L-R上在筛一次因为 R-L #include #i...
分类:其他好文   时间:2014-05-15 19:51:58    阅读次数:313
Codeforces Round #209 (Div. 2)——Prime Number
给一个素数x,和a1、a2……an,计算这个式子 的时候,化成了 这个形式, 且t等于 xa1?+?a2?+?...?+?an,求s和t的最大公约数 (1?≤?n?≤?105, 2?≤?x?≤?109) ,结果对1000000007 取模...
分类:其他好文   时间:2014-05-15 13:04:46    阅读次数:291
UVa 10047 - The Monocycle
题目:在一个n*m的迷宫中有一个轮子,轮子的每个72°的扇面被涂上一种不同的颜色。             轮子可以移动到上下左右四个方向的格子中,每次移动到相邻格子中,轮子转动72°。             每个单位时间轮子可以做两种运动:             1.移动到相邻格子;2.改变朝向,面向原来的左、右方(朝向改变90°),但不转动。             初始时轮子在'...
分类:其他好文   时间:2014-05-15 12:28:14    阅读次数:450
uva-----11292 The Dragon of Loowater
Problem C: The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek...
分类:其他好文   时间:2014-05-15 09:53:27    阅读次数:254
UVA之1121 - Subsequence
【题目】 A sequence of N positive integers (10 N , each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the subse...
分类:其他好文   时间:2014-05-15 07:58:17    阅读次数:329
Humble Numbers
Humble Numbers 题目描述 A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the fi...
分类:其他好文   时间:2014-05-15 01:36:22    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!