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
题意大概是,判断一个正整数区间内有多少个整数能被它自身的每一个非零的数字整除。因为每一个位置上的整数集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
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
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
题目原文:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it ...
分类:
其他好文 时间:
2014-08-05 00:51:58
阅读次数:
257
487-3279
Businesses like to have memorable telephone numbers. One way to make a telephone number memorableis to have it spell a memorable word or phrase. For example, yo...
分类:
其他好文 时间:
2014-08-04 21:41:34
阅读次数:
395
ASCII table and descriptionASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII cod...
分类:
其他好文 时间:
2014-08-04 17:31:17
阅读次数:
336
一开始想了一个用二进制状压的方法,发现空间需要的太大,光光memset都要超时 = = 其实不用每次都memset也可以用三进制,一开始直接打表出所有的状态转移就好#include #include #include #include #include #include #include #incl...
分类:
其他好文 时间:
2014-08-04 17:10:47
阅读次数:
259