码迷,mamicode.com
首页 >  
搜索关键字:island    ( 492个结果
IOI2008 Island 岛屿
题目描述: bz luogu 题解: 裸的基环树直径。 代码: #include<queue> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; cons ...
分类:其他好文   时间:2019-04-27 00:49:19    阅读次数:191
debian下如何源码安装tmux
一.源码安装ncurses库 1.1 获取源码 wget https://invisible-island.net/datafiles/release/ncurses.tar.gz tar xvf ncurses.tar.gz ~/ cd ~/ncurses-6.1 1.2 生成配置 ./autog ...
分类:其他好文   时间:2019-04-10 13:53:54    阅读次数:135
P4890 Never·island(dp)
P4890 Never·island 求门开的最小时间,其实也就是求门关的最大时间。 坐标这么大....显然坐标要离散化 离散化排序后,我们发现x轴被这些点划分成若干条线段$(l,r)$,并且有4种情况 我们用$v[i]$数组表示给队$i$钥匙的贡献 1.左端点为$i$队的起点,右端点为$i$队的终 ...
分类:其他好文   时间:2019-04-08 21:37:53    阅读次数:194
P4890 Never·island
传送门 考虑把所有区间离散化,对每一小段计算贡献 考虑把总区间长度减去最多能减少的区间长度 分类讨论一波,对于边界 $i,i+1$ ,设它们之间距离 $d$,$i$ 属于 $x$ 考察队的边界,$i+1$ 属于 $y$ 考察队的边界: $i$ 为左边界,$i+1$ 为左边界,显然如果给 $x$ 钥匙 ...
分类:其他好文   时间:2019-04-08 13:42:18    阅读次数:124
P4381 [IOI2008]Island
传送门 显然题目给的图构成一个基环树 对于每个基环树单独考虑,显然每个都走直径是最优的 考虑如何求出基环树的直径 把直径分为两种情况考虑,首先可以找出环 因为直径可能不在环边上,所以对每个环上节点的子树进行一遍 $dfs$,求出每个节点子树的直径 维护 $dis[x]$ 表示节点 $x$ 到叶子节点 ...
分类:其他好文   时间:2019-04-02 14:18:32    阅读次数:158
leetcode 463. 岛屿的周长(Island Perimeter)
[TOC] 题目描述: 给定一个包含 0 和 1 的二维网格地图,其中 1 表示陆地 0 表示水域。 网格中的格子水平和垂直方向相连(对角线方向不相连)。整个网格被水完全包围,但其中恰好有一个岛屿(或者说,一个或多个表示陆地的格子相连组成的岛屿)。 岛屿中没有“湖”(“湖” 指水域在岛屿内部且不和岛 ...
分类:其他好文   时间:2019-03-25 14:53:33    阅读次数:118
POJ 2485 Highways (最小生成树)
题目 : Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flato ...
分类:其他好文   时间:2019-03-14 13:13:01    阅读次数:155
LeetCode 463 Island Perimeter 解题报告
题目要求 You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontal ...
分类:其他好文   时间:2019-02-24 10:52:19    阅读次数:183
leetcode--200. Number of Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen ...
分类:其他好文   时间:2019-02-22 18:16:29    阅读次数:139
贪心——D - Radar Installation
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea ...
分类:其他好文   时间:2019-02-10 15:07:59    阅读次数:174
492条   上一页 1 ... 4 5 6 7 8 ... 50 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!