![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
图论——拓扑排序
文章平均质量分 77
# 图论——拓扑排序
pxlsdz
冲就完了!
展开
-
AOV拓扑排序(优先队列) HDU 1285 确定比赛名次
确定比赛名次TimeLimit: 2000/1000 MS (Java/Others) Memory Limit:65536/32768 K (Java/Others)Total Submission(s): 33731 Accepted Submission(s): 13226ProblemDescription有N个比赛队(1<=N<=500),编号依次为1,2,3,。...原创 2018-05-25 17:43:29 · 213 阅读 · 0 评论 -
Gym - 102267F F - Arena Olympics 判断点是否在视野+拓扑排序
Kassandra is participating in the Arena Olympics of Sparta. In order to win the arena fight, she has to knockout all the otherNNfighters.Being a computer scientist, she wanted to do it while prese...原创 2019-08-20 21:49:49 · 337 阅读 · 0 评论 -
Kattis - brexitnegotiations (Northwestern Europe Regional Contest (NWERC) 2018)
As we all know, Brexit negotiations are on their way—but we still do not know whether they will actually finish in time.The negotiations will take place topic-by-topic. To organise the negotiations ...原创 2019-05-03 20:18:15 · 953 阅读 · 0 评论 -
UVALive - 8149 Ingredients
The chef of a restaurant aspiring for a Michelin star wants to display a selection of her signature dishes for inspectors. For this, she has allocated a maximum budget B for the cumulated cost, and sh...原创 2019-05-02 21:31:30 · 166 阅读 · 0 评论 -
HDU 1811 Rank of Tetris (并查集+拓扑排序)
Rank of TetrisTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12637 Accepted Submission(s): 3595 Problem Description自从Lele开发了Rating系统...原创 2019-02-23 20:51:34 · 670 阅读 · 0 评论 -
hdoj 2647 Reward【反向拓扑排序+分层】
Problem DescriptionDandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. Now he has a trouble about how to distribute the rewards...原创 2019-02-23 18:55:27 · 208 阅读 · 0 评论 -
POJ3553 Task schedule (拓扑排序+贪心+优先队列)
Task scheduleTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 306 Accepted: 193 Special JudgeDescriptionThere are n preemptive jobs to be processed on a single ma...原创 2019-02-23 15:09:40 · 478 阅读 · 0 评论 -
POJ 3687 Labeling Balls(拓扑排序+逆向思维)
Labeling BallsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13776 Accepted: 3983DescriptionWindy has N balls of distinct weights from 1 unit to N units. Now he tries t...原创 2019-02-23 14:07:21 · 323 阅读 · 0 评论 -
POJ1094 Sorting It All Out 拓扑排序(判断严格小于关系&判断是否有环)
Sorting It All OutTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 24933 Accepted: 8662DescriptionAn ascending sorted sequence of distinct values is one in which some for...原创 2019-02-23 12:15:38 · 339 阅读 · 0 评论 -
C.处女座的比赛资格 拓扑排序实现有向无环最短路
链接:https://ac.nowcoder.com/acm/contest/329/B来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述处女座想出去比赛,但是又不知道学校能不能给到足够的经费。然而处女座是大众粉丝,有着很好的人缘,于是他找了一个在学校管经费的地...原创 2019-02-01 16:56:44 · 203 阅读 · 0 评论 -
HDU 5438 Ponds 拓扑排序(实现持续删点)
PondsTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2861 Accepted Submission(s): 901Problem DescriptionBetty owns a lot of ponds, so...原创 2019-01-21 22:21:42 · 375 阅读 · 0 评论 -
POJ 3272Cow Traffic /洛谷 P2883 [USACO07MAR]牛交通 双向拓扑排序
题目描述The bovine population boom down on the farm has caused seriouscongestion on the cow trails leading to the barn. Farmer John has decided toconduct a study to find the bottlenecks in order to reliev...原创 2018-06-15 00:19:06 · 362 阅读 · 0 评论 -
拓扑排序判断环
给你一个N点和M条有向边的图,问你该图是否可拓扑排序.#include<cstdio> #include<cstring> #include<vector> #include<queue> using namespace std; const int maxn=100+10; int n,m; vector<int...原创 2018-06-14 23:35:23 · 698 阅读 · 0 评论 -
拓扑排序
拓扑排序【定义】 对一个有向无环图(DirectedAcyclic Graph简称DAG)G进行拓扑排序,是将G中所有顶点排成一个线性序列,使得图中任意一对顶点u和v,若边(u,v)∈E(G),则u在线性序列中出现在v之前。【应用】拓扑排序通常用来“排序”具有依赖关系的任务。比如,如果用一个DAG图来表示一个工程,其中每个顶点表示工程中的一个任务,用有向边<A,B>...原创 2018-06-14 23:34:03 · 228 阅读 · 0 评论 -
拓扑排序算法(AOV)简单例题 【例4-12】、家谱树
【例4-12】、家谱树【问题描述】 有个人的家族很大,辈分关系很混乱,请你帮整理一下这种关系。 给出每个人的孩子的信息。 输出一个序列,使得每个人的后辈都比那个人后列出。【输入格式】 第1行一个整数N(1<=N<=100),表示家族的人数。 接下来N行,第I行描述第I个人的儿子。 每行最后是0表示描述完毕。【输出格式】 输出一个序列,使得每个人...原创 2018-05-24 23:28:12 · 1608 阅读 · 0 评论 -
拓扑排序 信息奥赛一本通 1352:【例4-13】奖金
1352:【例4-13】奖金时间限制: 1000 ms 内存限制: 65536 KB提交数: 607 通过数: 223 【题目描述】由于无敌的凡凡在2005年世界英俊帅气男总决选中胜出,Yali Company总经理Mr.Z心情好,决定给每位员工发奖金。公司决定以每个人本年在公司的贡献为标准来计算他们得到奖金的多少。于是Mr.Z下令召开m方会谈。每位参加会谈的代表提出了自己的...原创 2018-05-25 18:56:45 · 2036 阅读 · 0 评论 -
Educational Codeforces Round 72 (Rated for Div. 2)D. Coloring Edges 神仙规律
D. Coloring Edgestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a directed graph withnnvertices andmmdirected ...原创 2019-09-06 15:03:30 · 205 阅读 · 0 评论