![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
离散数学
文章平均质量分 69
cjliux
这个作者很懒,什么都没留下…
展开
-
C++实现Miller-Rabin素数测试
原理参见《离散数学》P201 #include #include #include #include using namespace std; bool Miller_Rabin(long long n) { if(n < 2) return false; else if(n == 2) return true; long long q = 0, m = n - 1; w原创 2015-08-10 14:25:06 · 2128 阅读 · 3 评论 -
matlab实现基于DFS的Ford_Fulkerson最大流最小割算法
function [F, maxf, V, S] = Ford_Fulkerson(C, src, sink) n = size(C, 1); F = zeros(n); maxf = 0; V = []; S = []; while true % in: ResNet. ResNet = C - F + F'; % residual network. % ou原创 2015-08-15 11:21:55 · 4336 阅读 · 12 评论