poj
Bigdz
新手一枚,大神们就不要来--------你懂得
展开
-
poj-1979-Red and Black
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can'原创 2017-07-24 14:21:17 · 217 阅读 · 0 评论 -
poj-1330-Nearest Common Ancestors-LCA(RMQ)
题目传送门:http://poj.org/problem?id=1330 什么是LCA? 公共祖先简称LCA(Lowest Common Ancestor),所谓LCA,是当给定一个有根树T时,对于任意两个结点u、v,找到一个离根最远的结点x,使得x同时是u和v的祖先,x 便是u、v的最近公共祖先。 额 ̄へ ̄ 听说有好多种解法,但是我就先发一种,其他回来补上 开始原创 2017-08-15 19:19:25 · 268 阅读 · 1 评论 -
poj-2718-Smallest Difference(dfs)
题目转送门:http://poj.org/problem?id=2718 好激动尽然过了,调了好几个小时,一直超时,网上的代码,大部分为两种做法: 一个是用next_permutation枚举全排列 另一个是 dfs暴力枚举 但是要注意一点,如果是下面的这种写法就会超时: #include #include #include #include原创 2017-07-25 14:01:21 · 248 阅读 · 0 评论 -
poj-1631-Bridging signals-最长上升序列(LIS)
额(⊙o⊙)… 先放题目链接 题目传送门:https://vjudge.net/problem/POJ-1631 题目就是求最长上升序列(自己想想吧!)原创 2017-08-14 10:55:38 · 251 阅读 · 2 评论