Declare i number; j number; mark number; cout number:=0;Begin for i in 1..1000 Loop mark :=0; for j in 2..i/2 Loop if (i mod ...
分类:
数据库 时间:
2015-04-10 22:19:52
阅读次数:
224
题目Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assum...
分类:
其他好文 时间:
2015-04-10 22:08:54
阅读次数:
153
只是为了存模板~
#include
#include
#include
using namespace std;
const int maxn = 100005;
int n,m;
int sorted[maxn];
int tree[20][maxn]; //第i层归并之后的结果
int toleft[20][maxn]; //第i层第j个数左边有几个分到左边(包括j自己)
voi...
分类:
其他好文 时间:
2015-04-10 20:19:08
阅读次数:
170
Largest Number
Given a list of non negative integers, arrange them such that they form the largest number.
For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330....
分类:
其他好文 时间:
2015-04-10 20:16:00
阅读次数:
140
卡特兰数又称卡塔兰数,英文名Catalan number,是组合数学中一个常出现在各种计数问题中出现的数列。由以比利时的数学家欧仁·查理·卡塔兰 (1814–1894)命名,其前几项为 : 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786...
分类:
其他好文 时间:
2015-04-10 20:00:39
阅读次数:
226
1.新建两张测试表,number表和users表。 ????????number表字段(id,number,name) ????????users表字段(id,name) 2.打开users表,设计表->触发器 ????名字(自定义),触发(After),选上插...
分类:
数据库 时间:
2015-04-10 18:17:23
阅读次数:
182
【题目】
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to ...
分类:
其他好文 时间:
2015-04-10 18:09:25
阅读次数:
117
Bessie and the cows are playing with sequences and need your help. They start with a sequence, initially containing just the number 0, and perform n operations. Each operation is one of the following:A...
分类:
其他好文 时间:
2015-04-10 18:03:44
阅读次数:
164
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operations permitted on a word:...
分类:
其他好文 时间:
2015-04-10 17:57:11
阅读次数:
171
1.TOP字句: 用于规定要返回的记录的数目select top number(个数)/percent(百分数) 列名 from 表名 2.like模糊查询,用于where字句中,以及通配符查询 名字开头为X的人的信息:查询 第五个字母为'Z' 的人的信息:[chrlist]:表示字符列中的任何单一...
分类:
数据库 时间:
2015-04-10 17:18:24
阅读次数:
207