![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
拓扑排序
等我学会后缀自动机
侠影之谜
展开
-
HDU 4661 Message Passing (树形DP+组合数学知识+拓扑排序计数思维)*
Message PassingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1461 Accepted Submission(s): 541 Problem DescriptionThere are n peo...原创 2018-08-29 17:58:31 · 348 阅读 · 0 评论 -
HDU 5438 Ponds (拓扑排序+DFS)
题目链接:acm.hdu.edu.cn/showproblem.php?pid=5438#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll unsigned l...原创 2019-02-08 00:51:56 · 143 阅读 · 0 评论 -
Gym 101128A Promotions (拓扑序性质+DFS标记)
题目链接:http://codeforces.com/gym/101128/attachments#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll unsig...原创 2019-02-09 21:08:09 · 172 阅读 · 0 评论 -
Codeforces Round #541 (Div. 2) D. Gourmet choice(DFS+并查集缩点)
题目链接:http://codeforces.com/contest/1131/problem/D题目大意题目背景没仔细看,大体意思就是有n*m的矩阵,然后(i,j)的符号代表第一类食物的i个和第二类食物的j个的大小关系。问是否存在满足这个矩阵关系的食物,如果存在则构造出来。题目分析思想:用Dp思想,首先是根据偏序关系来建图,用小的自底向上去更新大的,自顶向下我没...原创 2019-03-05 18:28:59 · 108 阅读 · 0 评论