找了很多地方都没看到,经过尝试,发现这么一种方法可以达到限定edittext中的字符。android:digits="1234567890qwertyuiopasdfghjklzxcvbnm`-=[]\;,./~!@#$%^*()_+}{:?&<>"'"里面是...
分类:
移动开发 时间:
2014-07-31 16:26:37
阅读次数:
222
题意:对一串数字进行抑或某数,和某数,或某数,统计某区间和的操作。思路:因为化成二进制就4位可以建4颗线段树,每颗代表一位二进制。and 如果该为是1 直接无视,是0则成段赋值为0;or 如果是0 无视,是1则成段赋值为1;xor 成段亦或,1个数和0个数交换;sum 求和;#include#inc...
分类:
其他好文 时间:
2014-07-31 02:22:55
阅读次数:
258
Problem Description
Given a positive integer n, your task is to find a positive integer m, which is a multiple of n, and that m contains the least number of different digits when represented in decim...
分类:
其他好文 时间:
2014-07-30 14:46:03
阅读次数:
230
Find DigitsProblem StatementGiven a number you have to print how many digits in that number exactly divides that number.Input formatThe first line con...
分类:
其他好文 时间:
2014-07-30 11:55:13
阅读次数:
250
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
分类:
其他好文 时间:
2014-07-30 11:30:33
阅读次数:
247
Reverse Integer
java,python,C++三种代码练习
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
click to show s...
分类:
其他好文 时间:
2014-07-29 22:02:52
阅读次数:
333
For a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits.
When M is the digitsum of N , we call N a generator of M .
For example, the digit-sum of 245 is 256 (...
分类:
其他好文 时间:
2014-07-29 21:53:12
阅读次数:
284
Description
Given two positive integers n and k, you are asked to generate a new integer, say m, by changing some (maybe none) digits of n, such that the following properties holds:
m contains n...
分类:
其他好文 时间:
2014-07-29 14:22:18
阅读次数:
225
解释一下:dp数组只保存!limit和!first的状态
dp数组保存的是,当前位确定后,之后的数字没有限制的结果,显然当limit或者first时候是不适合的。
first的时候是没必要记录的,因为到当前状态只有一条路径(当前位前边全零)
limit的时候也是没必要记录的,因为到当前状态只有一条路径(当前位前边和待求得串相同)
const int MAX_DIGITS, MAX_STAT...
分类:
其他好文 时间:
2014-07-27 11:37:25
阅读次数:
322
Problem Description
Now an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you can add or minus 1 to any d...
分类:
其他好文 时间:
2014-07-26 15:24:12
阅读次数:
280