数位DP。。。。
Palindromic Numbers
Time Limit: 2000MS
Memory Limit: 32768KB
64bit IO Format: %lld & %llu
[Submit] [Go Back] [Status]
Description
A palindro...
分类:
其他好文 时间:
2014-07-31 03:04:56
阅读次数:
247
最近在学习Android开发,一直没有弄清楚px,dp,dip,sp的区别。今天正好有时间,就花时间研究了一下。 众所周知,Android厂商非常多,各种尺寸的Android手机、平板层出不穷。导致了Android生态环境的碎片化现象越来越严重。Google公司为了解决分辨率过多的问题,在And.....
分类:
移动开发 时间:
2014-07-31 02:28:05
阅读次数:
298
以为可以做出这个dp 可是就是写不好 这个状态转移方程 fuck题意 还是很简单的... touch me贴下别人的思路 :----因为 我自己没做出来--传送在n个商店中建m个仓库,使各个商店到仓库的路程之和最小,商店到哪个仓库是有选择的,总之路程之和要最小!我还以给的例子来说,这道题的具体思路:...
分类:
其他好文 时间:
2014-07-31 02:24:55
阅读次数:
229
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2], The longes...
分类:
其他好文 时间:
2014-07-31 02:19:45
阅读次数:
243
Midlife for many is a time of transition, a time of questioning and a time of change, not just physically, but emotionally and mentally. It’s when you...
分类:
其他好文 时间:
2014-07-31 02:18:35
阅读次数:
325
HDU 1160 FatMouse's Speed (动规+最长递减子序列)...
分类:
其他好文 时间:
2014-07-31 00:04:08
阅读次数:
270
题目:编辑距离,给你两个串,将已知串转化成目标串,可以增、删、改字母,求最小操作次数。
分析:dp,编辑距离。同最大公共子序列。注意操作位置是实时变化的。(前面都已经处理好了)
f[i][j] = f[i-1][j] 这时删掉 str1[j+1];
f[i][j] = f[i][j-1]...
分类:
其他好文 时间:
2014-07-31 00:02:25
阅读次数:
282
题目链接:uva 1485 - Permutation Counting
题目大意:给定n和k,要求求一个由1~n组成的序列,要求满足ai>i的i刚好有k个的序列种数。
解题思路:dp[j][i]表示长度为i,j个位置满足的情况。
dp[j+1][i]+=dp[j][i]?(j+1);
1, (3), (4), 2: 括号位置代表ai>i,既满足位置,此时i
= 4...
分类:
其他好文 时间:
2014-07-31 00:00:55
阅读次数:
227
题目链接:uva 1489 - Math teacher's homework
题目大意:给定n,k,以及序列m1,m2,…,mn,
要求找到一个长度为n的序列,满足0=xi=mi,
并且x1XORx2XOR…XORxn=k
解题思路:数位dp,在网上看了别人的代码,高大上。。。
假设有二进制数 k : 00001xxxx
mi:0001xxxxx,
那么对于xi即可...
分类:
其他好文 时间:
2014-07-30 23:59:05
阅读次数:
692