Erlang系统自带的基础数据类型有:atom、tuple、list、binary、pid、float、number、port、reference、record。用户可以通过通过命令type来自定义数据类型,实现方法:-type device() :: atom() | pid().-type pr...
分类:
其他好文 时间:
2014-07-11 23:26:47
阅读次数:
507
Balanced Number
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)
Total Submission(s): 1871 Accepted Submission(s): 836
Problem Description
A balanced...
分类:
其他好文 时间:
2014-07-09 11:54:01
阅读次数:
187
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
两种方法翻转一个整数,顺序翻转和递归翻转这里没考虑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
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
一种方法是先翻转当前数,然后把它和原数比较(略)另一种是递归方法,借用一个复制数,对原数递归,使之翻转,然后配合复制数比较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
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394...
分类:
其他好文 时间:
2014-07-08 16:27:04
阅读次数:
138
方法二:利用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
Problem Description
A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially...
分类:
其他好文 时间:
2014-07-08 11:10:23
阅读次数:
164