上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
  2012年8月29日
摘要: As a doll master, Alice owns a wide range of dolls, and each of them has a number tip on it's back, the tip can be treated as a positive integer. (the number can be repeated). One day, Alice hears that her best friend Marisa's birthday is coming , so she decides to sent Marisa some dolls for 阅读全文
posted @ 2012-08-29 19:20 crying_Dream 阅读(205) 评论(0) 推荐(0)
  2012年8月27日
摘要: Assume that string A is the substring of string B if and only if we can find A in B, now we have a string A and another string B, your task is to find a A in B from B's left side to B's right side, and delete it from B till A is not a substring of B, then output the number of times you do th 阅读全文
posted @ 2012-08-27 20:32 crying_Dream 阅读(427) 评论(0) 推荐(0)
摘要: 发现KMP, 我都已经忘了,找到我之前写的总结,粘贴一下,保存留念吧; 发现之前我写的总结和你好玩的样子,自己都看笑了...hia hia hia hia...KMP我只了解你一点点KMP:即串模式匹配,(KMP分别是三个人名字的简称)。学习KMP推荐:严蔚敏数据结构课件。真心说她讲的很到位。能让你明白next[],的求法。简单算法基本思想(当字符串长度不大时):用i, j指主串和模式串。通过一个个比较,直至模式串与主串一一匹配则称匹配成功,否则失败。改进办法:不用将i指针一次次回朔,而是利用以匹配的结果是是模式串尽可能的向前滑动。 这里需要一个next[100], 的函数。函数模板:K... 阅读全文
posted @ 2012-08-27 20:20 crying_Dream 阅读(190) 评论(0) 推荐(0)
  2012年8月26日
摘要: Cinema in Akiba (CIA) is a small but very popular cinema in Akihabara. Every night the cinema is full of people. The layout of CIA is very interesting, as there is only one row so that every audience can enjoy the wonderful movies without any annoyance by other audiences sitting in front of him/her. 阅读全文
posted @ 2012-08-26 21:38 crying_Dream 阅读(444) 评论(0) 推荐(0)
摘要: There is going to be a test in the kindergarten. Since the kids would cry if they get a low score in the test, the teacher has already told every kid some information about the test in advance.But the kids are not satisfied with the information teacher gave. They want to get more. On the testing d.. 阅读全文
posted @ 2012-08-26 20:31 crying_Dream 阅读(278) 评论(0) 推荐(0)
  2012年8月25日
摘要: Problem DescriptionGiven an undirected, unweighted, connected graph, where each edge is colored either blue or red, determine whether a spanning tree with exactly k blue edges exists.InputThere will be several test cases in the input. Each test case will begin with a line with three integers:n m kWh 阅读全文
posted @ 2012-08-25 23:19 crying_Dream 阅读(530) 评论(0) 推荐(0)
摘要: Problem DescriptionTake a deck of n unique cards. Deal the entire deck out to k players in the usual way: the top card to player 1, the next to player 2, the kth to player k, the k+1st to player 1, and so on. Then pick up the cards – place player 1′s cards on top, then player 2, and so on, so that p 阅读全文
posted @ 2012-08-25 19:53 crying_Dream 阅读(446) 评论(0) 推荐(0)
  2012年8月23日
摘要: DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so that Bessie's clover patch i 阅读全文
posted @ 2012-08-23 21:08 crying_Dream 阅读(237) 评论(0) 推荐(0)
  2012年8月17日
摘要: DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of a sequence of positive integer numbers ranging from 1 to k, written one after another.For example, the first 80 digits of 阅读全文
posted @ 2012-08-17 22:12 crying_Dream 阅读(410) 评论(0) 推荐(0)
摘要: Problem Description Some brave warriors come to a lost village. They are very lucky and find a lot of treasures and a big treasure chest, but with angry zombies. The warriors are so brave that they decide to defeat the zombies and then bring all the treasures back. A brutal long-drawn-out battle la. 阅读全文
posted @ 2012-08-17 16:38 crying_Dream 阅读(479) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页