![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
文章平均质量分 92
Amber0130
这个作者很懒,什么都没留下…
展开
-
Router Mesh
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述In a Mesh networking system, there are nnn MI Routers, where mmm pairs of MI Routers are bidirectionally connected. In order to check the stability of the system, for each MI原创 2020-10-26 18:34:41 · 204 阅读 · 0 评论 -
网络流24题-太空飞行计划
WWW 教授正在为国家航天中心计划一系列的太空飞行。每次太空飞行可进行一系列商业性实验而获取利润。现已确定了一个可供选择的实验集合 E=E1,E2,⋯,EmE=E_1,E_2,⋯,E_mE=E1,E2,⋯,Em,和进行这些实验需要使用的全部仪器的集合 I=I1,I2,⋯,InI=I_1,I_2,⋯,I_nI=I1,I2,⋯,In。实验 EjE_jEj 需要用到的仪器是 III 的子集 Rj⊆IR_j⊆IRj⊆I。配置仪器 IkI_kIk 的费用为 ckc_kck 美元。实验 EjE_j原创 2020-09-25 16:40:27 · 172 阅读 · 0 评论 -
网络流24题-搭配飞行员
搭配飞行员飞行大队有若干个来自各地的驾驶员,专门驾驶一种型号的飞机,这种飞机每架有两个驾驶员,需一个正驾驶员和一个副驾驶员。由于种种原因,例如相互配合的问题,有些驾驶员不能在同一架飞机上飞行,问如何搭配驾驶员才能使出航的飞机最多。因为驾驶工作分工严格,两个正驾驶员或两个副驾驶员都不能同机飞行。Input第一行,两个整数 nnn 与 mmm,表示共有 nnn 个飞行员,其中有 mmm 名飞行员是正驾驶员。下面有若干行,每行有 222 个数字 a、ba、ba、b。表示正驾驶员 aaa 和副驾驶员原创 2020-09-25 10:52:32 · 341 阅读 · 0 评论 -
Expectation
ExpectationTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Problem DescriptionYou are given an undirected graph consisting of nnn vertices with mmm weighted edges. We define the weight of a spanning tree as the bi原创 2020-09-03 10:40:24 · 141 阅读 · 0 评论 -
Regular Forestation
Regular Forestation时间限制: 1 Sec 内存限制: 128 MB题目描述A forestation is an act of planting a bunch of trees to grow a forest, usually to replace a forest that had been cut down. Strangely enough, graph theorists have another idea on how to make a forest, i.e原创 2020-09-01 13:58:54 · 161 阅读 · 0 评论 -
Beautiful Graph
Beautiful Graphtime limit per test2 secondsmemory limit per test256 megabytesYou are given an undirected unweighted graph consisting of nnn vertices and m edges.You have to write a number on each vertex of the graph. Each number should be 1,2or31, 2 .原创 2020-08-29 20:49:34 · 138 阅读 · 0 评论 -
Go Running
Go RunningTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Problem DescriptionZhang3 is the class leader. Recently she’s implementing a policy about long-distance running. This forces every student in her class to原创 2020-08-29 19:32:33 · 757 阅读 · 0 评论 -
Asteroids
AsteroidsTime Limit: 1000MS Memory Limit: 65536KDescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an NxNN x NNxN grid (1<=N<=500)(1 <= N <= 500)(1<=N<=500). The grid contains KKK a原创 2020-08-28 21:05:42 · 162 阅读 · 0 评论 -
Guardian of Decency
Guardian of DecencyProblem DescriptionFrank N. Stein is a very conservative high-school teacher. He wants to take some of his students on anexcursion, but he is afraid that some of them might become couples. While you can never exclude thispossibilit原创 2020-08-28 19:58:13 · 113 阅读 · 0 评论 -
Tree
TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionYou are given a tree consisting of n vertices numbered 111 to nnn rooted at node 111. The parent of the iii-th vertices is pip_ipi. You can move原创 2020-08-19 08:11:05 · 119 阅读 · 0 评论 -
树洞
树洞时间限制: 1 Sec 内存限制: 128 MB题目描述在一片栖息地上有 NNN 棵树,每棵树下住着一只兔子,有 MMM 条路径连接这些树。更特殊地是,只有一棵树有 333 条或更多的路径与它相连,其它的树只有 111 条或 222 条路径与其相连。换句话讲,这些树和树之间的路径构成一张 NNN个点、MMM 条边的无向连通图,而度数大于 222 的点至多有 111 个。近年以来,栖息地频繁收到人类的侵扰。兔子们联合起来召开了一场会议,决定在其中 KKK 棵树上建造树洞。当危险来临时,每只兔原创 2020-08-18 06:57:46 · 3699 阅读 · 0 评论 -
能量树 (tree)
能量树 (tree)时间限制: 1 Sec 内存限制: 128 MB题目描述555 月 222 日的模拟赛太良心了。各位 dalaodalaodalao 们全都先把五校题 AAA 了。“这题好水!”“你说这出题人出这种水题给我们干嘛?”“就是!这么水的动规当我们是小萌新吗?”CaBeFYyxCaBeF_YyxCaBeFYyx 听了十分伤心:为什么我老是被 DDD 呢?Rainy7Rainy7Rainy7 成功回答出了老者的问题,成为了魔法王国的国王,统治者整个王国。但是她管理得不原创 2020-08-18 06:11:46 · 1796 阅读 · 0 评论 -
Tokitsukaze and Rescue
题目链接题意: 节点数n<=50的完全图,去掉k条边( 最大为5 ) 之后,1-n的最短路的最大值是多少?思路: dfs暴力 完全图,随机的数据,大体可以猜测最短路不会太长,所以只要每次跑一下最短路,取一条最短路出来,枚举删除最短路上的一条边,然后递归,变成删除 (k − 1) 条边的子问题。#include <iostream>#include <cstdio>using namespace std;con...原创 2020-08-12 15:32:00 · 139 阅读 · 0 评论