- 博客(8)
- 收藏
- 关注
原创 uva-10344 - 23 out of 5
Problem I23 Out of 5Input: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBYour task is to write a program that can decide whether you can find an arithmetic ex
2014-10-12 11:10:25 509
原创 uva-301 - Transportation
Transportation Ruratania is just entering capitalism and is establishing new enterprising activities in many fields including transport. The transportation company TransRuratania is star
2014-10-12 10:41:46 866
原创 uva-216 - Getting in Line
Computer networking requires that the computers in the network be linked.This problem considers a ``linear" network in which the computers are chained together so that each is connected to exactly
2014-10-05 19:55:02 429
原创 uva-110-Meta-Loopless Sorts
eta-Loopless Sorts Background Sorting holds an important place in computer science. Analyzing and implementing various sorting algorithms forms an important part of the education of mo
2014-10-04 18:20:11 565
原创 uva-131 - The Psychic Poker Player
The Psychic Poker Player In 5-card draw poker, a player is dealt a hand of five cards (which may be looked at). The player may then discard between zero and five of his or her cards and ha
2014-10-04 18:15:59 681
原创 kmp求字符串最小周期
总时间限制: 3000ms 内存限制: 65536kB描述给定两个字符串a和b,我们定义a*b为他们的连接。例如,如果a=”abc” 而b=”def”, 则a*b=”abcdef”。 如果我们将连接考虑成乘法,一个非负整数的乘方将用一种通常的方式定义:a^0=””(空字符串),a^(n+1)=a*(a^n)。输入每一个测试样例是一行可打印的字符作为输入,用s表示。s
2014-10-03 22:31:37 2113 2
原创 kmp代码
void getNext(char* p,int next[]) { int len = strlen(p); int i = 0, j = -1; next[i] = j; while (i < len - 1) { //p[j]表示前缀,p[i]表示后缀 if (j == -1 || p[i] ==
2014-10-03 21:59:06 773
原创 单调队列的应用
描述给定一个长度为n(n下面是一个例子:数组是 [1 3 -1 -3 5 3 6 7], k = 3。窗口位置最小值最大值[1 3 -1] -3 5 3 6 7 -13 1 [3 -1 -3] 5 3 6 7 -33 1 3 [-1 -3 5] 3 6 7
2014-10-01 10:24:39 2257
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人