摘要: 1 #include <cstdio> 2 typedef long long ll; 3 int quick_pow(ll a,ll b,ll mod){ 4 ll ans=1; 5 for(;b;a=(a*a)%mod,b>>=1)if(b&1)ans=(ans*a)%mod; 6 return 阅读全文
posted @ 2020-02-23 15:30 墨鳌 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1 #include <cstdio> 2 const int M=150010,N=30010; 3 struct edge{int v,w,next;}e[M];int head[N],cnt; 4 void add(int u,int v,int w){e[++cnt].v=v,e[cnt]. 阅读全文
posted @ 2020-02-23 15:15 墨鳌 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 枚举子集,要求子集的min+max<=k,求子集个数,答案对1000000007取模 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn=100010,MOD=1000000007; 4 typedef long lo 阅读全文
posted @ 2020-02-23 00:32 墨鳌 阅读(177) 评论(0) 推荐(0) 编辑