摘要: Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains 阅读全文
posted @ 2018-04-14 23:38 bw98 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Description RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partne 阅读全文
posted @ 2018-04-14 21:37 bw98 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 这篇文章讲无权二分图(unweighted bipartite graph)的最大匹配(maximum matching)和完美匹配(perfect matching),以及用于求解匹配的匈牙利算法(Hungarian Algorithm);不讲带权二分图的最佳匹配。 二分图:简单来说,如果图中点可 阅读全文
posted @ 2018-04-14 20:47 bw98 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(171) 评论(0) 推荐(0) 编辑