码迷,mamicode.com
首页 >  
搜索关键字:pairs    ( 1028个结果
codeforces159D - Palindrome pairs 二重DP
题意:给你一个字符串,问你其中不重叠的回文字串对有多少解题思路:这题用到两种方法,不过其实是一个很巧妙的二重dp1)暴力求解以i开头,j结尾的是否为回文,如果是,ans += sum[i-1](ans 为答案, sum[i]为在 1 - i内回文串的个数--需要dp求解)这里非常耗时,时间大约为 n...
分类:其他好文   时间:2014-07-30 20:05:44    阅读次数:276
Product UVA 10106
题目: Product The Problem The problem is to multiply two integers X, Y. (0250) The Input The input will consist of a set of pairs of lines. Each line in pair contains one mu...
分类:其他好文   时间:2014-07-29 18:03:42    阅读次数:283
uva331 - Mapping the Swaps
Mapping the Swaps Sorting an array can be done by swapping certain pairs of adjacent entries in the array. This is the fundamental technique used in t...
分类:移动开发   时间:2014-07-29 12:38:06    阅读次数:212
acm集训训练赛(二)D题【并查集】
一、题目DescriptionThere is a town with N citizens. It is known that some pairs of people are friends. According to the famous saying that ?The friends of...
分类:其他好文   时间:2014-07-27 22:32:29    阅读次数:278
Problem D UVA 10608
Problem IFRIENDSThere is a town with N citizens. It is known that some pairs of people are friends. According to the famous saying that ?The friends o...
分类:其他好文   时间:2014-07-27 22:31:29    阅读次数:255
UVA 10608 FRIENDS
Problem DescriptionThere is a town with N citizens. It is known that some pairs of people are friends. According to the famous saying that “The friend...
分类:其他好文   时间:2014-07-27 22:26:19    阅读次数:199
[ACM] POJ 3096 Surprising Strings (map的使用)
Surprising Strings Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5783   Accepted: 3792 Description The D-pairs of a string of letters are the ordered pai...
分类:其他好文   时间:2014-07-23 20:59:05    阅读次数:288
Swap Nodes in Pairs leetcode java
题目:Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.http....
分类:编程语言   时间:2014-07-23 12:01:06    阅读次数:330
UVA Mapping the Swaps
题目如下: Mapping the Swaps  Sorting an array can be done by swapping certain pairs of adjacent entriesin the array. This is the fundamental technique used in the well-knownbubbl...
分类:移动开发   时间:2014-07-16 17:08:59    阅读次数:252
lua中的pairs和ipairs区别
pairs Returns three values: the next function, the table t, and nil, so that the construction for k,v in pairs(t) do body end will iterate over all key–value pairs of table t. See functi...
分类:其他好文   时间:2014-07-14 18:39:58    阅读次数:317
1028条   上一页 1 ... 97 98 99 100 101 ... 103 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!