Given a string S, find the longest palindromic
substring in S. You may assume that the maximum length of S is 1000, and there
exists one unique longes...
分类:
其他好文 时间:
2014-05-24 04:45:39
阅读次数:
245
题目链接Given a string, find the length of the
longest substring without repeating characters. For example, the longest
substring without repeating letter...
分类:
其他好文 时间:
2014-05-24 02:15:57
阅读次数:
291
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-05-23 11:54:10
阅读次数:
317
题意:给你由N个点构成一颗树,问要孤立出一个有P个节点的子树最少需要删除多少条边。N的范围最大为150N的范围不大,很容易想到在树上面做背包。把每个节点都看成一个背包,然后把每个儿子节点都看成是一组物品。为什么是一组呢,那是因为假设以儿子为根的节点的子树有S个节点,那么就有S+1种情况,要么将这整棵...
分类:
其他好文 时间:
2014-05-23 10:05:26
阅读次数:
276
??
Printer Queue
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3679
Accepted: 1975
Description
The only printer in the computer science students' union is...
分类:
其他好文 时间:
2014-05-23 08:05:45
阅读次数:
273
??
Terrible Sets
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 2999
Accepted: 1549
Description
Let N be the set of all natural numbers {0 , 1 , 2 , . . . ...
分类:
其他好文 时间:
2014-05-22 09:52:10
阅读次数:
283
Cash MachineTime Limit:1000MSMemory
Limit:10000KTotal Submissions:26172Accepted:9238DescriptionA Bank plans to
install a machine for cash withdrawal. ...
分类:
其他好文 时间:
2014-05-20 10:55:48
阅读次数:
270
http://poj.org/problem?id=3164第一次做最小树形图,看着别人的博客写,还没弄懂具体的什么意思。 1 #include 2
#include 3 #include 4 #include 5 #define maxn 1000 6 using namesp...
分类:
Web程序 时间:
2014-05-20 09:39:34
阅读次数:
324
Communication SystemTime Limit: 1000MSMemory Limit:
10000KTotal Submissions: 22445Accepted: 7977DescriptionWe have received an order
from Pizoor Comm....
分类:
其他好文 时间:
2014-05-20 07:37:17
阅读次数:
454