复制代码

05 2018 档案

摘要:大数理论 入门 Luacs(n,m,p) = C(n%p,m%p)*Lucas(n/p,m/p,p); C(n,m,p) = n!/(n-m)! ^p-2 modp #include<bits/stdc++.h> using namespace std; #define LOACL freopen( 阅读全文
posted @ 2018-05-25 23:59 pg633 阅读(159) 评论(0) 推荐(0)
摘要:11. 盛最多水的容器 class Solution { public: int maxArea(vector<int>& height) { vector<int> & v =height; int l =0,r=v.size()-1; int res = 0; while(l<r) { int 阅读全文
posted @ 2018-05-21 23:38 pg633 阅读(139) 评论(0) 推荐(0)
摘要:1 .Edmonds-Karp 算法 : 通过反向增光路+bfs 求解最大流 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w",stdout); 阅读全文
posted @ 2018-05-19 15:36 pg633 阅读(147) 评论(0) 推荐(0)
摘要:#include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w",stdout); const int sz = (int)1e7 + 5; const dou 阅读全文
posted @ 2018-05-17 16:50 pg633 阅读(160) 评论(0) 推荐(0)
摘要:#include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w",stdout); const int sz = (int)1e6 + 5; #define C 阅读全文
posted @ 2018-05-09 21:19 pg633 阅读(204) 评论(0) 推荐(0)
摘要:模板 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w",stdout); #define REP(i,l,r) for(int i=l;i<=r 阅读全文
posted @ 2018-05-09 20:47 pg633 阅读(175) 评论(0) 推荐(0)