题意: 这题显然直接tarjan是做不了的. 这里安利另一个求SCC的算法Kosaraju,学习的话可以见这篇博客 于是结合莫队,我们有了个暴力. 发现主要瓶颈是dfs过程中找最小的未经过的点,我们用bitset优化一下就过了. 注意有重边,不能直接在biset中删除,要开个邻接矩阵判一下. code: #include<bits/stdc++.h> using namespace std; #define re register typedef long long ll; const int…
Description The Pizazz Pizzeria prides itself or more (up to ) orders to be processed before he starts any deliveries. Needless to say, he would like to take the shortest route in delivering these goodies and returning to the pizzeria, even if it mea…
嘤嘤嘤,我又来了,刚A完就写,这个沙雕题有丶恶心. ???时间4.11发现所有表情包都莫得了 题目: In an n×n chessboard, Prince and Princess plays a game. The squares in the chessboard are numbered 1, 2, 3, . . . , n∗n, as shown below: Prince stands in square 1, make p jumps and…