码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
P3574 FAR-FarmCraft 题解
题目描述 In a village called Byteville, there are $n$ houses connected with $n 1$ roads. For each pair of houses, there is a unique way to get from one to ...
分类:其他好文   时间:2020-04-07 00:16:06    阅读次数:70
判断10步能不能回到原点
题目描述: # You live in the city of Cartesia where all roads are laid out in a perfect grid.# You arrived ten minutes too early to an appointment, so you ...
分类:其他好文   时间:2020-04-06 00:16:25    阅读次数:94
[poj1724]Roads
欢迎回来,这里是做图论已经做到疯了的爱上了图论的Darth Victor。没错今天又是图论题,最近一直在刷图论。 题目 N cities named with numbers 1 ... N are connected with one-way roads. Each road has two pa ...
分类:其他好文   时间:2020-03-14 10:59:13    阅读次数:51
【PAT】A1018 Public Bike Management
【思路】 题目生词 figure n. 数字 v. 认为,认定;计算;是……重要部分 The stations are represented by vertices and the roads correspond to the edges. 顶点表示车站,边表示道路。 correspond to ...
分类:其他好文   时间:2020-02-16 13:22:29    阅读次数:72
CF191C Fools and Roads
$\Large\textbf{Description:} \large{有一颗 n 个节点的树,k 次旅行,问每一条边被走过的次数。}$ $\Large\textbf{Solution:} \large{树上差分板子??}$ $\Large\textbf{Code:}$ $\large\color{ ...
分类:其他好文   时间:2020-02-06 23:05:05    阅读次数:89
UVA10308 Roads in the North 树的最长路径
Description Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such th ...
分类:其他好文   时间:2020-02-01 21:13:17    阅读次数:94
CF191C Fools and Roads
题目链接:https://www.luogu.com.cn/problem/CF191C https://codeforces.com/problemset/problem/191/C 题意: 给你一棵树,然后给你m对点,将每对点之间的最短路径上每条边权值+1,求操作完成后每条边的权值。 方法: p ...
分类:其他好文   时间:2020-01-30 09:57:29    阅读次数:75
Constructing Roads POJ - 2421 最小生成树板子题
#include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=110; int p[N]; struct edge{ int a; int b; int w; }e[N*N]; in ...
分类:其他好文   时间:2020-01-29 14:22:30    阅读次数:62
Jungle Roads POJ - 1251 模板题
#include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=0x3f3f3f3f; int p[50]; struct edge{ int a,b,w; }e[100]; bool ...
分类:其他好文   时间:2020-01-29 12:11:08    阅读次数:72
PAT (Advanced Level) 1087 All Roads Lead to Rome
题解 最短路径经典题型。套最短路的板子再加上额外的要求就可以了(说起来好简单)。SPFA也行,Dijkstra也可以。这里我用的是SPFA。因为题目要求,将地名和其对应的数字用map映射一下,这样方便处理。 same[i]代表到达地点 i 有几种路径; dist[i]代表从起点到地点 i 的最短距离 ...
分类:其他好文   时间:2020-01-24 00:32:49    阅读次数:112
729条   上一页 1 2 3 4 5 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!