码迷,mamicode.com
首页 >  
搜索关键字:maximum number of th    ( 33896个结果
Cracking the Coding Interview Q1.6
Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do th...
分类:其他好文   时间:2014-07-08 22:06:25    阅读次数:222
hdu 4722 Good Numbers(初涉数位dp)
http://acm.hdu.edu.cn/showproblem.php?pid=4722 大致题意:若一个整数的各位数字之和是10的倍数,称这个数为"good number"。给出区间[A,B],求出该区间内"good number"的数的个数。 第一道数位dp,折腾了半天才明白怎么回事。 设dp[site][mod]表示到第site位(由高位向低位)前面各位数字之和对1...
分类:其他好文   时间:2014-07-08 20:46:41    阅读次数:223
翻转整数 Reverse digits of a number
两种方法翻转一个整数,顺序翻转和递归翻转这里没考虑overflow的情况递归的作用是使得反向处理,即从递归栈的最低端开始处理,通过画图可得。如果是rec(num/10):123451234123121         package recursion; public class Reverse_digits_of_a_number { public static void main(Str...
分类:其他好文   时间:2014-07-08 18:34:14    阅读次数:208
POJ 2057 The Lost House
The Lost House Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 2140   Accepted: 886 Description One day a snail climbed up to a big tree and finally came to th...
分类:其他好文   时间:2014-07-08 18:08:00    阅读次数:267
LeetCode——ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I...
分类:其他好文   时间:2014-07-08 17:42:31    阅读次数:192
判断一个整数是否为回文数 Check if a number is palindrome
一种方法是先翻转当前数,然后把它和原数比较(略)另一种是递归方法,借用一个复制数,对原数递归,使之翻转,然后配合复制数比较package recursion; public class Check_if_a_number_is_palindrome { public static void main(String[] args) { int num = 121321; System....
分类:其他好文   时间:2014-07-08 17:13:55    阅读次数:188
HDU 1394 Minimum Inversion Number.(线段树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394...
分类:其他好文   时间:2014-07-08 16:27:04    阅读次数:138
zoj 3537 Cake (凸包判定+区间dp)
Cake Time Limit: 1 Second      Memory Limit: 32768 KB You want to hold a party. Here's a polygon-shaped cake on the table. You'd like to cut the cake into several triangle-shaped parts for th...
分类:其他好文   时间:2014-07-08 15:36:15    阅读次数:298
SVN下最高效打基线方法
方法二:利用SVN自身的revision number。最高效的方法是在关键commit时说明打基线,或者说明关键要点,比如评审后修改再复核通过,比如评审通过。 方法二更加正式的做法是利用专门的表格记录关键点的Revision Number...
分类:其他好文   时间:2014-07-08 13:19:15    阅读次数:309
冒泡排序
一、基础版~冒泡排序/* *@authoropxin *@version1.0 *冒泡算法 * */ publicclassBubbleSort { publicstaticvoidmain(String[]args) { int[]number= {36,12,78,51,93,18,88,29,64,45}; inttemp=0; for(inti=0;i<number.length;i++) { for(intj=0;j<number.length-1-i;j++)..
分类:其他好文   时间:2014-07-08 12:11:43    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!