码迷,mamicode.com
首页 >  
搜索关键字:reduced id numbers    ( 75814个结果
hdu 4722 Good Numbers(dp)
题目链接:hdu 4722 Good Numbers 题目大意:给出a,b,问从a到b之间,有多少个好数字,好数字的定义为:每个位的数字相加是10的倍数。 解题思路:dp[i][j]表示第i位,前i-1位的和为j(j可以从200简化成10,以为只需要考虑最后的数是否是10的倍数即可)有多少个数,需要注意的就是恰好为b的情况,所以要有一个跟踪值s。 #include ...
分类:其他好文   时间:2014-05-10 09:46:45    阅读次数:232
ZOJ 2158 && POJ 1789 Truck History (经典MST)
链接:http://poj.org/problem?id=1789 或  http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1158 Description Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are use...
分类:其他好文   时间:2014-05-10 09:39:59    阅读次数:440
HDU 1102 && POJ 2421 Constructing Roads (经典MST~Prim)
链接:http://poj.org/problem?id=2421  或   http://acm.hdu.edu.cn/showproblem.php?pid=1102 Problem Description There are N villages, which are numbered from 1 to N, and you should build some roads ...
分类:其他好文   时间:2014-05-10 09:34:09    阅读次数:389
Sql_Server中如何判断表中某列是否存在
/*判断表AA中是否存在AA_ID这一列,如果不存在,则新增*/ IF NOT EXISTS (SELECT 1 FROM syscolumns INNER JOIN sysobjects ON sysobjects.id = syscolumns.id WHERE syscolumns.name = 'AA_ID' AND sysobjects.name = 'AA') ALTER TA...
分类:数据库   时间:2014-05-07 07:33:47    阅读次数:373
codechef Little Elephant and Permutations题解
The Little Elephant likes permutations. This time he has a permutation A[1], A[2], ..., A[N] of numbers 1, 2, ...,N. He calls a permutation A good, if the number of its inversions is equal to the n...
分类:其他好文   时间:2014-05-07 07:20:50    阅读次数:356
ThinkPHP学习(四)volist标签高级应用之多重嵌套循环
Action代码: public function index(){ $prod = I("get.prod_en"); $id = I("get.id", 0, "int"); if ($prod == ""){ $serviceProduct = array();//多重循环遍历的数组 //数据保存在两张表中,这里通过循环初始化$serviceProduct数组...
分类:Web程序   时间:2014-05-07 07:13:02    阅读次数:440
Android-自定义meta-data扩展数据
Android-自定义meta-data扩展数据2014年5月5日 在接入第三方渠道SDK的时候,经常会看到其配置文件AndroidManifest.xml有类似如下的定义: <meta-data android:name="APP_ID" android:value="037810BCE1D2260F32017643AC7D980...
分类:移动开发   时间:2014-05-07 06:50:16    阅读次数:495
mysql数据库的优化、恢复等操作
1、当你的自增id主键很大时,你想让id重新到1开始自增                    请输入: truncate table 表名; 2、当你的数据库损坏时,你别慌先试试这条命令是否可以帮助你      请输入: repair table 表1,表2… 3、当你的数据表中含有varchar、text等并进行多次删除添加等操作,      会产生好多碎片空间,这回浪费资源,需要进行...
分类:数据库   时间:2014-05-07 05:40:59    阅读次数:426
codechef Subtraction Game 1题解
Subtraction Game 1 Chef is playing a game on a sequence of N positive integers, say A1, A2, ... AN. The game is played as follows. If all the numbers are equal, the game ends.Otherwise Sele...
分类:其他好文   时间:2014-05-07 03:14:01    阅读次数:280
oracle实现自增id
--oracle实现自增id --创建一张T_StudentInfo表 create table T_StudentInfo ( "id" integer not null primary key, xsName nvarchar2(120) not null, xsAge integer not null, Mobile varchar(...
分类:数据库   时间:2014-05-06 15:04:22    阅读次数:525
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!