/*Elevator
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It...
分类:
其他好文 时间:
2014-08-05 19:23:40
阅读次数:
209
Data Structures
1. Integer
– find number of 1s
– next largest smaller
– smallest larger number
– determine if is palindrom
– itoa, atoi
– add 2 numbers w/...
分类:
其他好文 时间:
2014-08-05 15:50:40
阅读次数:
408
题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partition....
分类:
编程语言 时间:
2014-08-05 13:32:29
阅读次数:
252
题意大概是,判断一个正整数区间内有多少个整数能被它自身的每一个非零的数字整除。因为每一个位置上的整数集s = {0,1,2,3,4,5,6,7,8,9} lcm(s) = 2520现在有一个整数t是由s中一个或者多个数字构成的,记为abcde,显然t = a*10^4+b*10^3+c*10^2+d...
分类:
其他好文 时间:
2014-08-05 13:28:39
阅读次数:
233
Prime Palindrome GolfDo you know how to play Prime Palindrome Golf? You are given a number and your challenge is to find the closest palindromic prime...
分类:
其他好文 时间:
2014-08-05 13:24:49
阅读次数:
274
ROADSTime Limit:1000MSMemory Limit:65536KTotal Submissions:10777Accepted:3961DescriptionN cities named with numbers 1 ... N are connected with one-way...
分类:
其他好文 时间:
2014-08-05 10:55:59
阅读次数:
977
Absolute sortLet's try some sorting. Here is an array with the specific rules.The array (a tuple) has various numbers. You should sort it, but sort it...
分类:
其他好文 时间:
2014-08-05 10:50:49
阅读次数:
204
Palindrome
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 52543
Accepted: 18113
Description
A palindrome is a symmetrical string, that is, a string read...
分类:
其他好文 时间:
2014-08-05 09:36:39
阅读次数:
246
Python数字数据类型用于存储数值。数据类型是不允许改变的,这就意味着如果改变数字数据类型得值,将重新分配内存空间。以下实例在变量赋值时数字对象将被创建:var1=1
var2=10您也可以使用del语句删除一些数字对象引用。del语句的语法是:delvar1[,var2[,var3[....,varN]]]]您..
分类:
编程语言 时间:
2014-08-05 03:11:29
阅读次数:
374
HDU 3117 Fibonacci Numbers(斐波那契前后四位,打表+取对+矩阵快速幂)
ACM
题目地址:HDU 3117 Fibonacci Numbers
题意:
求第n个斐波那契数的前四位和后四位。
不足8位直接输出。
分析:
前四位有另外一题HDU 1568,用取对的方法来做的。
后四位可以用矩阵快速幂,MOD设成10000就行了。
...
分类:
其他好文 时间:
2014-08-05 03:05:38
阅读次数:
208