码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
异常处理
异常处理 一、预定义异常: Dup_val_on_index:试图向唯一索引列插入重复值,相当于建立了一个唯一索引 然后再向这个索引的列中插入一条重复的数据就会异常。 Invalid_cursors:试图进行非法的游标操作 Invalid_number : 试图将字符串转换为数字 no_data_found : select into 语句没有返回任何记录 Too_many_rows ...
分类:其他好文   时间:2014-08-19 09:27:03    阅读次数:210
UVA 10791 Minimum Sum LCM (数论)
LCM (Least Common Multiple) of a set of integers is defined as the minimum number, which is a multiple of all integers of that set. It is interesting to note that any positive integer can be expressed...
分类:其他好文   时间:2014-08-18 23:38:13    阅读次数:275
poj1351Number of Locks(记忆化搜索)
题目链接: 传送门 思路: 这道题是维基百科上面的记忆化搜索的例题。。。 四维状态dp[maxn][5][2][5]分别表示第几根棒子,这根棒子的高度,是否达到题目的要求和使用不同棒子数,那么接下来就是状态转移了。。。要用到位运算判断以前是否这种高度的棒子用到没。。。那么这个问题就解决了。。。 题目: Number of Locks Time Limit:...
分类:其他好文   时间:2014-08-18 23:36:33    阅读次数:264
10624 - Super Number
题目链接 题意:给出n到m的范围,求出一个数在前i位数组成的数字能被i整除,如果存在输出这个数,如果不存在,输出-1. 思路:回溯,每次放第i位,然后判断是否符合题意。这题踩着时间过去的2.6s(看了下别人的题解,可以减少取模次数来节省时间)。 代码: #include #include #include #include using namespace ...
分类:其他好文   时间:2014-08-18 22:05:53    阅读次数:303
编程之美leetcode之编辑距离
Edit Distance   Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operati...
分类:其他好文   时间:2014-08-18 20:35:02    阅读次数:206
2014多校联合七(HDU 4937 HDU 4938 HDU 4939 HDU 4941)
好几天没写题解了… 都怪我太弱  补题补不动… HDU 4937 Lucky Number 题意:一个数字如果只有3456这四种数字组成  那么这个数字是幸运的  问  给出一个x  它在几种进制下是幸运的  如果无穷输出-1 思路: 分类讨论  如果x是3或4或5或6  那么一定有无穷个进制满足(从十进制开始…)  直接输出-1 除去上述情况  那么我们可以将一个数字写成这样 a0 +...
分类:其他好文   时间:2014-08-18 18:40:02    阅读次数:243
POJ 2318 计算几何+二分
TOYS Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10425 Accepted: 5002 Description Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a...
分类:其他好文   时间:2014-08-18 18:38:13    阅读次数:307
HDU 1058 Humble Numbers (dp+打表)
先是想筛法素数表啊,然后1~2000000000枚举打表啊,结果越想越不对。 后来想到唯一分解定理,可是怎么实现呢。。果然还是需要努力啊。。 研究了discuss代码,码之~ ~~~~ dp的思想,若dp[i]是Humble Numbers,那么dp[i]*2,dp[i]*3,dp[i]*5,dp[i]*7都将是Humble Numbers。 所以只需要注意连续性便好了。 #inclu...
分类:其他好文   时间:2014-08-18 18:32:52    阅读次数:166
Java进阶之欧拉工程 第十五篇【2的1000次方各位之和为多少】
题目如下: 215 = 32768 并且其各位之和为 is 3 + 2 + 7 + 6 + 8 = 26. 21000 的各位数之和是多少? 原题如下: 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 210...
分类:编程语言   时间:2014-08-18 16:28:02    阅读次数:272
UVA - 10892 LCM Cardinality (枚举因子)
A pair of numbers has a unique LCM but a single number can be the LCM of more than one possible pairs. Forexample 12 is the LCM of (1, 12), (2, 12), (3,4) etc. For a given positive integer N, the ...
分类:其他好文   时间:2014-08-18 16:25:24    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!