上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页

2014年7月17日

Tree

摘要: uva548:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=489题意:给出一颗二叉树的中序遍历和后序遍历,求一条路径,这条路径从根... 阅读全文

posted @ 2014-07-17 10:56 天依蓝 阅读(132) 评论(0) 推荐(0) 编辑

2014年7月16日

More lumber is required

摘要: hdu4396:http://acm.hdu.edu.cn/showproblem.php?pid=4396题意:一个无向带权图,然后给出起点s,终点e,让你求s到e的最短路径,但是这里的路径有要求的。每经过一条边会得到10单位的财富,这条路径必须得到的财富至少k值。题解:一开始以为是DP,看了别人... 阅读全文

posted @ 2014-07-16 19:52 天依蓝 阅读(234) 评论(0) 推荐(0) 编辑

History Grading

摘要: uva111:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=47题意:看懂之后就是求两个串的最长公共子串。题解:不过这里要注意一下,... 阅读全文

posted @ 2014-07-16 14:32 天依蓝 阅读(247) 评论(0) 推荐(0) 编辑

strcmp() Anyone?

摘要: uva11732:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2832&mosmsg=Submission+received+with... 阅读全文

posted @ 2014-07-16 10:21 天依蓝 阅读(289) 评论(0) 推荐(0) 编辑

2014年7月15日

How Many Points of Intersection?

摘要: uva10790:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1731题意:两条水平线,分别有n,m个点,点之间两两连线,求有多少个交点。题解:手动模拟一... 阅读全文

posted @ 2014-07-15 16:46 天依蓝 阅读(125) 评论(0) 推荐(0) 编辑

Remember the Word

摘要: uvalive3942:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1943题意:给以一个串,然后给你一些单词,问你这个串由这些单词组成的... 阅读全文

posted @ 2014-07-15 10:30 天依蓝 阅读(285) 评论(0) 推荐(0) 编辑

Shortest Prefixes

摘要: poj2001:http://poj.org/problem?id=2001题意:给你一些单词,然后让你寻找每个单词的一个前缀,这个前缀能够唯一表示这个单词,并且是最短的。题解:直接用trie树来搞。每个节点维护一个val值,每次插入经过该点值,把该点val加1,然后查询的时候,如果当前节点val是... 阅读全文

posted @ 2014-07-15 10:20 天依蓝 阅读(354) 评论(0) 推荐(0) 编辑

统计难题

摘要: hdu1251:http://acm.hdu.edu.cn/showproblem.php?pid=1251题意:Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).题解:Trie模... 阅读全文

posted @ 2014-07-15 10:12 天依蓝 阅读(129) 评论(0) 推荐(0) 编辑

2014年7月14日

Steps

摘要: uva846:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=787题意:给你两个数x,y,x 2 #include 3 #include 4 #includ... 阅读全文

posted @ 2014-07-14 18:34 天依蓝 阅读(176) 评论(0) 推荐(0) 编辑

DZY Loves Sequences

摘要: CF255 Div2 C:http://codeforces.com/contest/447/problem/C题意:给你一个序列,你可以改变其中一个数,然后让你求最长的连续上升子序列。题解:一开始的想法就是 处理出以i结尾和以i开头的最长的串的长度,然后枚举i。然而,自己就这样打了一发,结果wa。... 阅读全文

posted @ 2014-07-14 08:34 天依蓝 阅读(606) 评论(0) 推荐(0) 编辑

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页

导航