摘要:
原题链接 题解 好抽象啊!!! 大概思路就是把强连通分量看作一个点,然后在此基础上找入度为零的点 code #include<bits/stdc++.h> using namespace std; vector<int> G[205]; int in[205]={0};//代表强连通分量的入度 in 阅读全文
posted @ 2024-02-24 17:28
纯粹的
阅读(18)
评论(0)
推荐(0)
摘要:
原题链接 题解 一个节点的答案一定是最大父节点+1 code #include<bits/stdc++.h> using namespace std; int ans[100005]={0}; int in[100005]={0}; vector<int> G[100005]; struct uni 阅读全文
posted @ 2024-02-24 13:09
纯粹的
阅读(19)
评论(0)
推荐(0)
摘要:
原题链接 题解 对于原序列而言,如果第一个元素是最大值或最小值,那么l肯定不能落在这,由于r也不可能落在这,所以相当于这个元素被剔除了 那么对于区间 \([1,n]\) 的研究就等价于对 \([2,n]\) 的研究 由此可以推出之后的做法 code #include<bits/stdc++.h> u 阅读全文
posted @ 2024-02-24 01:46
纯粹的
阅读(25)
评论(0)
推荐(0)

浙公网安备 33010602011771号