摘要:
题目传送门 一、题意解析 $n$个节点,若干次询问,\(I\) \(x\) $y$表示从$x$连一条边到$y$,权值为$|x-y|%1000$;\(E\) $x$表示询问$x$到$x$所指向的终点的距离。 二、实现代码 #include <bits/stdc++.h> using namespace 阅读全文
posted @ 2022-04-09 21:37
糖豆爸爸
阅读(41)
评论(0)
推荐(0)
摘要:
题目传送门 解题思路: DAG求拓扑序 利用拓扑序列,根据题意做递推 #include <bits/stdc++.h> using namespace std; const int N = 110, M = N * N / 2; int n, m; int f[N], din[N], dout[N] 阅读全文
posted @ 2022-04-09 15:47
糖豆爸爸
阅读(84)
评论(0)
推荐(0)

浙公网安备 33010602011771号