金币系统Time Limit:1000msMemory Limit:65535KB64-bit integer IO format:%lld Java class name:MainYC大牛自从杭州归来,喜欢没事儿摆个地摊儿什么的的赚点零钱买装备。经过一个星期的苦苦支撑,终于裸奔了一把鹰角弓出来。-...
分类:
其他好文 时间:
2014-07-09 00:12:42
阅读次数:
211
Max SumTime Limit:1000msMemory Limit:32768KBThis problem will be judged on HDU. Original ID:100364-bit integer IO format:%I64d Java class name:MainGiv...
分类:
其他好文 时间:
2014-07-08 23:42:52
阅读次数:
273
创建表 列名 类型,
1...create table Student (id integer , name text, sex text, age integer)
2…create table if not exists Student (id integer , name text default '张三' , sex text n...
分类:
数据库 时间:
2014-07-08 18:47:19
阅读次数:
213
两种方法翻转一个整数,顺序翻转和递归翻转这里没考虑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
def reverse(head):
if head == None or head.next == None:
return head
psuhead = ListNode(-1)
while head:
nexthead = head.next
head.next = psuhead.next
psuhead.next = head
head = nexthead
...
分类:
其他好文 时间:
2014-07-08 15:27:58
阅读次数:
183
# @left part: [start, mid]
# @right part: (mid, end]
def merge(data, start, mid, end):
if mid < start or end < mid:
return 0
reverse = 0
'''
@ for start, it play as the start index of left par...
分类:
其他好文 时间:
2014-07-08 15:04:06
阅读次数:
204
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summed and the process ...
分类:
其他好文 时间:
2014-07-08 14:12:32
阅读次数:
226
明确递归语句之前的语句都是顺序执行,而递归语句之后的语句都是逆序执行package recursion;
import java.util.Stack;
public class Reverse_a_stack_using_recursion {
/*
Input stack:
3
2
1
Output stack:
1
2
3
*/
public s...
分类:
其他好文 时间:
2014-07-08 13:39:49
阅读次数:
143
自J2SE 5.0开始提供的基本数据类型的自动装箱(autoboxing)、拆箱(unboxing)功能。
何为自动装箱:
当我们创建一个Integer对象时,却可以这样:
Integer
i = 100; (注意:不是 int i = 100; )
实际上,执行上面那句代码的时候,系统为我们执行了:Integer i = new Integer(100); 此即基本数据类型的自...
分类:
编程语言 时间:
2014-07-08 13:26:20
阅读次数:
185
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:
其他好文 时间:
2014-07-08 12:52:05
阅读次数:
200