2.6k2 分钟

分情况讨论:如果的话,就直接跑Dijkstra。否则就先用优先堆模拟出可以到达哪些点,然后对这些点跑Dijkstra,不过dp方程要改变 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi &#
1.2k1 分钟

amazing #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln 
1.5k1 分钟

#include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln = 2.718
1.6k1 分钟

prime r k g 3 1 1 2 5 1 2 2 17 1 4 3 97 3 5 5 193 3 6 5 257 1 8 3 7681 15 9 17 12289 3 12 11 40961 5 13 3 65537 1 16 3 786433 3 18 10 5767169 11 19 3 7340033 7 20 3 23068673 11 21 3 104857601 25 22 3 167772161 5 25 3 469762049 7 26 3 1004535809 479 21 3 2013
1.8k2 分钟

看板子学会的求欧拉回路 :) #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double e