题意:给定x、y,为[x,y]之间有多少个数的偶数位和减去奇数位和等于一。
个位是第一位。
例子: 10=1-0=1 所以10是这样的数
思路:数位dp[i][sum][ok] i位和为sum 是否含有前导0.
然后就是因为有负数 所以根据范围把0设置为100 然后最后和等于101则为所求的数。
代码:
#include"cstdlib"
#include"cstdio"
#inclu...
分类:
其他好文 时间:
2014-09-19 17:43:29
阅读次数:
186
Pooling: OverviewAfter obtaining features using convolution, we would next like to use them for classification. In theory, one could use all the extra...
分类:
其他好文 时间:
2014-09-19 17:22:45
阅读次数:
233
Fully Connected NetworksIn the sparse autoencoder, one design choice that we had made was to "fully connect" all the hidden units to all the input uni...
分类:
其他好文 时间:
2014-09-19 17:02:25
阅读次数:
238
C# Code First : Validation failed for one or more entities. See 'EntityValidationErrors' property for more details...
分类:
其他好文 时间:
2014-09-19 15:44:35
阅读次数:
195
.*/",$html,$matchs);if ($matchs[1]) { foreach ($matchs[1] as $key => $one) { $sub_url = $domain.$one; $result = getUrlByPattern($sub_...
分类:
Web程序 时间:
2014-09-19 13:42:35
阅读次数:
264
一、声明数组1)array[key]=value # array[0]=one,array[1]=two2)declare -a array # array被当作数组名3)array=( value1 value2 value3 ... )4)array=( [1]=one [2]=two [3]=...
分类:
其他好文 时间:
2014-09-19 11:25:35
阅读次数:
165
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime compl....
分类:
其他好文 时间:
2014-09-18 23:33:14
阅读次数:
292
Grunt入门教程之二
Concat插件
concat是grunt中用来做文件连接的常用插件,比如说你写了一个类库,有三大模块,如:
one.js
two.js
three.js
当你的项目准备发布的时候,你可能需要将这三个模块合并成一个大的模块all.js,这样做可以减少H...
分类:
其他好文 时间:
2014-09-18 22:21:44
阅读次数:
201
Crossing
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 1564
Accepted: 726
Description
Wintokk has collected a huge amount of coins at THU. One day he had...
分类:
其他好文 时间:
2014-09-18 22:19:04
阅读次数:
309
Description
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, l...
分类:
其他好文 时间:
2014-09-18 14:53:34
阅读次数:
213