http://www.tuicool.com/articles/bI3IBv附问题:有以下一个SQL语句:SELECT *FROM ( SELECT t.*, row_number() OVER (ORDER BY ID) rn FROM mytable ...
分类:
数据库 时间:
2015-03-30 15:50:07
阅读次数:
213
这道题是把字符串类型的类似于表格的字母对应到数字,题目意思很简单,我一开始还很把每个字母映射到数字,后来看到别人用这个方法计算每个字母的值s[i]-'A',这么简单的方法不用简直是可惜。int titleToNumber(char *s) {
int sum=0,i;
int len=strlen(s);
for(i=0;i<len;i++)
sum=sum*26+(s[i]-'A...
分类:
其他好文 时间:
2015-03-30 14:40:46
阅读次数:
126
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in...
分类:
其他好文 时间:
2015-03-30 13:09:17
阅读次数:
161
在操作mysql数据库表时出现以下错误。网上google搜索相关问题,发现一位外国牛人这么解释:If you're running an operation on a large number of rows within a table that uses the InnoDB storage e...
分类:
数据库 时间:
2015-03-30 13:04:58
阅读次数:
179
dmidecode -t Memory #查内存 Maximum Capacity: 4 GB #最大4G Number Of Devices: 2 #2个插槽服务器到底能扩展到多大的内存? #man一下 dmidecode就可以看到 每个参数前面都有个数字#dmidecode -t 16如果是4*...
分类:
其他好文 时间:
2015-03-30 12:48:45
阅读次数:
189
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:
编程语言 时间:
2015-03-30 11:10:46
阅读次数:
154
1009. K-based Numbers
Time limit: 1.0 second
Memory limit: 64 MB
Let’s consider K-based numbers, containing exactly N digits. We define a number to be valid if itsK-based notation doesn’t c...
分类:
其他好文 时间:
2015-03-30 09:30:12
阅读次数:
116
1426. Phone List
Constraints
Time Limit: 1 secs, Memory Limit: 64 MB
Description
Given a list of phone numbers, determine if it is consistent in the sense that no number is the pre?x...
分类:
其他好文 时间:
2015-03-30 09:21:57
阅读次数:
182
2011. Nine Digits
Constraints
Time Limit: 2 secs, Memory Limit: 256 MB
Description
Nine tiles, each with a number from 1 to 9 on it, are packed into a 3 by 3 frame. Your task is to ...
分类:
其他好文 时间:
2015-03-30 09:20:39
阅读次数:
104
1781. Knight
Constraints
Time Limit: 1 secs, Memory Limit: 64 MB
Description
Your task is to write a program to calculate the minimum number of moves needed for a knight to reach one...
分类:
其他好文 时间:
2015-03-30 09:20:25
阅读次数:
146