码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
SqlServerDBA 常用代码
--查看partition的四个视图select * from sys.partition_functions--查看分区函数select * from sys.partition_parametersselect * from sys.partition_range_values--查看分区函数对...
分类:数据库   时间:2014-08-12 21:53:04    阅读次数:181
python冒泡排序
def bubble_sort(list):     for i in range(len(list)):         for j in (range(i,len(list))):             if list[j]                 temp = list[j]                 list[j] = list[i]...
分类:编程语言   时间:2014-08-12 17:27:54    阅读次数:216
python选择排序
def select_sort(list): for i in range(len(list)): position = i for j in range(i,len(list)): if list[position] > list[j]: position = j temp = list[i] list[i] = list[position] list[pos...
分类:编程语言   时间:2014-08-12 17:25:34    阅读次数:236
python插入排序
def insert_sort(list): for i in range(len(list)): while i > 0 and list[i] < list[i-1]: temp = list[i] list[i] = list[i-1] list[i-1] = temp i = i-1...
分类:编程语言   时间:2014-08-12 17:25:24    阅读次数:269
Python流程控制 if / for/ while
在Python中没有switch语句If语句if condition:do sthelif condition: Do sthelse: Do sthwhile语句有一个可选的else从句while condition: do sthelse: do sthfor循环for i in range(1...
分类:编程语言   时间:2014-08-12 16:38:44    阅读次数:193
Scheme N皇后
(define (range n) (define (recur n) (if (= n -1) '() (cons n (recur (- n 1))))) (recur (- n 1)))(define (flatten a)...
分类:其他好文   时间:2014-08-12 16:24:34    阅读次数:183
HDU-1067-Gap(BFS+HASH)
Problem Description Let's play a card game called Gap. You have 28 cards labeled with two-digit numbers. The first digit (from 1 to 4) represents the suit of the card, and the second digit (from 1 ...
分类:其他好文   时间:2014-08-12 10:24:14    阅读次数:379
HDU 1058 Humble Numbers(DP,数)
题意 所有只能被2,3,5,7这4个素数整除的数称为Humble Number 输入n 输出第n个Humble Number 1是第一个humble number 对于一个Humble Number a 有2*a,3*a,5*a,7*a都是Humble Number 可以以1为基数 依次展开即可得到一定范围内的Humble Number 用i,j,k,l分别记录 2,3,5,7分别乘到了第几个Humble Number 当前在计算第cnt个Humble Number 那么有 hum[c...
分类:其他好文   时间:2014-08-12 10:20:23    阅读次数:202
[LeetCode] Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example, [1,1,2] have the following unique pe...
分类:其他好文   时间:2014-08-12 10:17:03    阅读次数:142
UVA471- Magic Numbers
题目链接 题意:s1/s2=N,s1、s2、N都是各个位数上数字不相同的整数。给定N,求有多少个这样的式子并输出。 思路:其实最大的数只能是9876543210,所以我们只要暴力枚举,枚举过程中判断s1、s2是否符合题目要求。 #include #include #include #include #include using namespace std;...
分类:其他好文   时间:2014-08-11 21:21:33    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!