[问题描述]Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioni...
分类:
其他好文 时间:
2014-10-07 01:23:32
阅读次数:
341
摘要:Part I分析了GPU客户端之间存在的同步问题,以及Chromium的GL扩展同步点机制的基本原理。本文将源代码的角度剖析同步点(SyncPoint)机制的实现方式。同步点机制的实现主要涉及到是如何跨进程实现两个GL扩展接口InsertSyncPointCHROMIUM和WaitSyncPointCHROMIUM的实现方式,以及如何实现GPU服务端的同步点等待。...
分类:
其他好文 时间:
2014-10-06 13:53:50
阅读次数:
132
【leetcode】Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s....
分类:
其他好文 时间:
2014-10-06 12:12:00
阅读次数:
149
H. 硬币水题II
Time Limit: 1000ms
Case Time Limit: 1000ms
Memory Limit: 65536KB
64-bit integer IO format: %lld Java class name: Main
Submit Status PID:
29064
Font Size:
+
-
...
分类:
其他好文 时间:
2014-10-05 22:07:59
阅读次数:
167
题目大意:给定一个由‘W','I','N','G'构成的字符串,给定一些规则,这些规则可以将两个字符合成为一个,例如"II"可以合成为'W',"WW"可以合成为'I'或者'N'
求这个字符串可以最终合成为哪几种字符
看到这题我想到了广搜。。。其实没必要,动归完全可以解决
令f[i][j][k]为从i开始的j个字符是否可以合成为字符[k]
然后j从外层循环,剩下的全部预处理,怎么暴力怎么转移...
分类:
其他好文 时间:
2014-10-04 17:25:07
阅读次数:
234
假设你有一个数组,它的第i个元素是一个股票在一天的价格。
设计一个算法,找出最大的利润。...
分类:
其他好文 时间:
2014-10-04 16:57:46
阅读次数:
122
/*
*
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without u...
分类:
其他好文 时间:
2014-10-04 14:32:16
阅读次数:
211
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
For example,
I...
分类:
其他好文 时间:
2014-10-03 22:24:55
阅读次数:
273
题目大意:
用集合A中的串构造出一个串,使之让更多的setB中的串成为他的子串。
思路分析:
和
Codeforces 86C 差不多。
不过这里是要用A中的构造。
先用A 和 B的串构造一个自动机。然后对于A集合的尾结点给出一个最大后缀匹配,对于B集合的尾结点给一个权值。
dp[i][j][k] 表示已经构造出来了一个长度为i的串,现在走到了自动机的j结点,i长度后面有k...
分类:
其他好文 时间:
2014-10-03 17:13:14
阅读次数:
227
9月27日后缀数组:【wikioi3160】最长公共子串dp:NOIP2001统计单词个数后缀自动机:【spoj1812】Longest Common Substring II【wikioi3160】最长公共子串【spoj7258】Lexicographical Substring Search扫描...
分类:
其他好文 时间:
2014-10-03 15:17:24
阅读次数:
1374