1.在学习c语言,难免会遇到多参函数,刚好c中也提供了一些机制:宏函数#ifdef _M_ALPHAtypedef struct {char *a0; /* pointer to first homed integer argument */int offset; /* byte offset of...
分类:
其他好文 时间:
2015-05-03 20:34:47
阅读次数:
149
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2015-05-03 20:22:13
阅读次数:
155
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.
注:回数是指正读和倒读都一样的数:需要注意点
(1)负数不是回数
(2)个位数都是回数
思路:
(1)使用前一题的整数的倒序,将一个数倒序,然后和原值比较:存在的问题是可能有溢出...
分类:
其他好文 时间:
2015-05-03 17:34:33
阅读次数:
114
Making the GradeTime Limit: 1000msMemory Limit: 65536KBThis problem will be judged onPKU. Original ID:366664-bit integer IO format:%lld Java class nam...
分类:
其他好文 时间:
2015-05-03 17:15:29
阅读次数:
120
Write an algorithm to determine if a number is "happy".
A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares...
分类:
移动开发 时间:
2015-05-03 10:43:52
阅读次数:
145
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm sho...
分类:
其他好文 时间:
2015-05-02 16:34:30
阅读次数:
107
Redraw Beautiful DrawingsTime Limit: 1500msMemory Limit: 65536KBThis problem will be judged onHDU. Original ID:488864-bit integer IO format:%I64d Java...
A simple Gaussian elimination problem.Time Limit: 1000msMemory Limit: 65536KBThis problem will be judged onHDU. Original ID:497564-bit integer IO form...
分类:
其他好文 时间:
2015-05-02 15:01:04
阅读次数:
116
1 public static void main(String args[]) { 2 List ints = Arrays.asList(new Integer[]{new Integer(1), new Integer(3)}); 3 int s =0; 4 ...
分类:
其他好文 时间:
2015-05-02 13:44:56
阅读次数:
92
Integer is a subtype of NumberDouble is a subtype of NumberArrayList is a subtype of ListList is a subtype of CollectionCollection is a subtype of Ite...
分类:
其他好文 时间:
2015-05-02 13:43:28
阅读次数:
91