上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: Description Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtr 阅读全文
posted @ 2018-04-14 17:35 bw98 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Description 在图问题中当最大流有多组解时,给每条边在附上一个单位费用的量,问在满足最大流时的最小费用是多少? 思路 蒟蒻在这里套用一下博主STILLxjy的说法: 给出一个容量网络,那他的最大流一定是一个定值(即使是有多个一样的最大值)。所以我们从开始的可行流开始增广时,最终的增广量是一 阅读全文
posted @ 2018-04-13 09:21 bw98 阅读(704) 评论(0) 推荐(0) 编辑
摘要: Description Every 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 wa 阅读全文
posted @ 2018-04-11 18:48 bw98 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Description 1) 给定一个整数数组,其中不同的整数中包含的数字个数可能不同,但是该数组中,所有整数中总的数字数为n。说明如何在O(n)时间内对该数组进行排序 2)给定一个字符串数组,其中不同的串包含的字符个数可能不同,但所有串中总的字符个数为n。说明如何在O(n)时间内对该数组进行排序( 阅读全文
posted @ 2018-03-23 15:44 bw98 阅读(306) 评论(0) 推荐(0) 编辑
摘要: Description A square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotat 阅读全文
posted @ 2018-03-10 16:00 bw98 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 设计大纲以及流程图 1.设备驱动问题中不同类的继承关系 2.USB驱动程序工作逻辑图 3.数据传输逻辑图 实现 环境:Ubuntu,内核 3.10.1 ,内核配置教程:链接,可将 USBHID卸载并装上自身的 usbmouse 驱动模块进行测试。请在配置内核时取消 HID 支持,因为装上了它就已经实 阅读全文
posted @ 2018-03-09 23:18 bw98 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 递归版归并排序 我们在 CLRS 中已经学会了归并排序的递归写法: merge函数: def merge(left, right): # prerequisite: both left and right is sorted list ret = [] i = 0 j = 0 while i < l 阅读全文
posted @ 2018-03-09 13:15 bw98 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Description 给定两个串a = 'a0a1……ap'和b = 'b0b1……bq',其中每一个 ai 和每一个 bj 都属于某个有序字符集,如果下面两条规则之一成立,则说串a按字典序小于串b: 1)存在一个整数 j,0 <= j <= min(p,q),使得ai = bi,i = 0,1, 阅读全文
posted @ 2018-03-08 16:43 bw98 阅读(409) 评论(0) 推荐(0) 编辑
摘要: Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a st 阅读全文
posted @ 2018-03-06 19:47 bw98 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每 阅读全文
posted @ 2018-03-04 21:08 bw98 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页