码迷,mamicode.com
首页 >  
搜索关键字:edges    ( 333个结果
Educational Codeforces Round 37 (Rated for Div. 2) E. Connected Components? 图论
E. Connected Components? You are given an undirected graph consisting of n vertices and edges. Instead of giving you the edges that exist in the graph ...
分类:其他好文   时间:2019-11-07 19:37:43    阅读次数:118
CF696B Puzzles 概率期望
code: #include <bits/stdc++.h> #define N 100005 #define setIO(s) freopen(s".in","r",stdin) using namespace std; int n,edges; double f[N]; int hd[N],to ...
分类:其他好文   时间:2019-11-04 21:38:02    阅读次数:98
LeetCode 5098. 树的直径
地址 https://leetcode-cn.com/contest/biweekly-contest-12/problems/tree-diameter/ 给你这棵「无向树」,请你测算并返回它的「直径」:这棵树上最长简单路径的 边数。 我们用一个由所有「边」组成的数组 edges 来表示一棵无向树 ...
分类:其他好文   时间:2019-11-03 14:21:23    阅读次数:121
[CF960F] Pathwalks
问题描述 You are given a directed graph with n n nodes and m m edges, with all edges having a certain weight. There might be multiple edges and self loops ...
分类:其他好文   时间:2019-10-26 23:08:45    阅读次数:94
Templates
Game theory Nim SG function Graph theory SPFA Dijkstra MST (Kruskal) Virtual tree 例: "[SDOI2011]消耗战" Tree plus cycle (contaning multiple edges) Heavy ...
分类:其他好文   时间:2019-10-12 22:26:29    阅读次数:95
Codeforces 920E-Connected Components? (set,补图,连通块)
Connected Components? "CodeForces 920E " You are given an undirected graph consisting of n vertices and edges. Instead of giving you the edges that ex ...
分类:其他好文   时间:2019-10-02 12:41:59    阅读次数:102
Educational Codeforces Round 72 (Rated for Div. 2)-D. Coloring Edges-拓扑排序
"Educational Codeforces Round 72 (Rated for Div. 2) D. Coloring Edges 拓扑排序" 【Problem Description】 ? 给你一个有向图,给用最少的颜色给每条边染色,要保证不存在一个环中的所有边都是同一个颜色。 【Solu ...
分类:编程语言   时间:2019-09-16 12:17:32    阅读次数:95
[LeetCode] 834. Sum of Distances in Tree 树中距离之和
An undirected, connected?tree with nodes labelled and `edges`?are?given. The th edge connects nodes and together. Return a list , where is the sum of ...
分类:其他好文   时间:2019-09-15 01:12:27    阅读次数:221
Codeforces Round 72 (Rated for Div. 2) D
http://codeforces.com/contest/1217/problem/D D. Coloring Edges time limit per test 1 second memory limit per test 256 megabytes input standard input o ...
分类:其他好文   时间:2019-09-07 13:32:00    阅读次数:110
HDU-6705 path (bfs)
Problem Description You have a directed weighted graph with n vertexes and m edges. The value of a path is the sum of the weight of the edges you pass ...
分类:其他好文   时间:2019-08-23 22:15:13    阅读次数:109
333条   上一页 1 ... 4 5 6 7 8 ... 34 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!