DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j...
分类:
编程语言 时间:
2015-03-07 13:40:34
阅读次数:
157
题目链接:Maximum Subarray
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,?5,4],
the contiguous s...
分类:
其他好文 时间:
2015-03-07 11:38:51
阅读次数:
198
题目链接:N-Queens II
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
这道题的要求是返回N皇后问题总共有多少不同情况。
和N-Queens问题一样,同样的思路,至少这个是统计数量...
分类:
其他好文 时间:
2015-03-07 11:38:06
阅读次数:
132
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit string...
分类:
其他好文 时间:
2015-03-07 01:02:15
阅读次数:
210
都说Oracle存在NUMBER和VARCHAR2类型的隐式转换,严格意义上需要避免,但为何需要避免,从下面的实验进行验证。
1. 创建测试表和索引
create table tn (id number, name varchar2(1));
create index idx_tn on tn (id);
create index idx_tn on tn (name);
分别对NU...
分类:
数据库 时间:
2015-03-06 20:49:31
阅读次数:
178
Problem Description
The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the curren...
分类:
其他好文 时间:
2015-03-06 19:15:02
阅读次数:
145
//ans[i]=ans[i-1]+(n+1)-2*num[i]
//num[i]为输入时的数据
//ans[i]为m=i时的逆序数
//用树状数组求ans[0]的逆序对
#include
#include
#include
using namespace std;
const int maxn=5010;
int num[maxn];
int tree[maxn];
int...
分类:
编程语言 时间:
2015-03-06 19:07:36
阅读次数:
165
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址。type: 要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和delete也可以使用,但仅部分浏览器支持。timeout: 要求为Number类型的参数,设置请求超...
分类:
Web程序 时间:
2015-03-06 18:27:52
阅读次数:
122
基本数据类型
nil?boolean?number?string?userdata?function?thread?table
--将一个全局变量复制为nil?即等价于删除该变量
函数?string?type()返回参数类型
nil为false?其他为true
print("10"...
分类:
其他好文 时间:
2015-03-06 17:32:56
阅读次数:
129
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:
其他好文 时间:
2015-03-06 15:34:13
阅读次数:
153