- 博客(12)
- 收藏
- 关注
转载 最短线性递推式 BM算法板子
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define pb push_back #define m...
2019-07-21 12:12:43
269
原创 (CC的凸包)卢卡斯定理+数位dp
CC想知道所有满足(0<=i<=n)(0<=k<=m)且不能被3整除的组合数的个数模998244353的结果。 即计算 #include<bits/stdc++.h> #define ll long long using namespace std; ll dp[100][2][2]; int num1[100],num2[100]; bool visit...
2019-03-14 23:11:02
251
原创 手速帝CZK
给出数组a(1-N)。输入x和y;求;有多组询问。 #include<bits/stdc++.h> using namespace std; #define ll long long #define maxn 300000 ll a[maxn*2+10]; ll res[maxn*2+10]; ll ans[maxn+10]; struct cc { int x,y,id; ...
2018-10-22 14:10:03
252
原创 莫比乌斯函数之和
#include <cstdio> #include <map> #include <iostream> #define N 20000000 using namespace std; long long a,b,n; int mu[N+10],pri[1300010],top; bool mark[N+10]; map<long long,long l...
2018-10-22 13:57:28
260
转载 树链剖分(点权)
#include<bits/stdc++.h> #define MAX 123466 #define ll long long using namespace std; struct Front_Link_Star{ int next,to; }edge[MAX<<1]; ll Ma,Mi; ll tree[MAX << 2],lazy[MAX &l...
2018-10-22 13:54:57
191
转载 树链剖分(边权)
#include<bits/stdc++.h> #define MAX 123466 #define ll long long using namespace std; struct Front_Link_Star{ int next,to; }edge[MAX<<1]; ll Ma,Mi; ll tree[MAX << 2],lazy[MAX &l...
2018-10-22 13:49:46
367
原创 欧拉函数之和
#include<bits/stdc++.h> using namespace std; #define ll long long const int maxs = 5000000; bool vis[maxs+10]; int prime[maxs+10]; ll phi[maxs+10]; const ll mod=1e9+7;const ll inv=500000004; ...
2018-10-22 13:33:43
421
转载 中国剩余定理(不互质)
#include<iostream> #include<cstdio> #include<climits> #include<cstring> #include<algorithm> using namespace std; #define LL long long const int maxn=15; int n; LL exgcd(...
2018-10-22 13:31:07
256
转载 中国剩余定理
#include<iostream> #include<cstdio> #include<climits> #include<cstring> #include<algorithm> using namespace std; int n; __int128 m[15],a[15],lcm; __int128 exgcd(__int128...
2018-10-22 13:28:45
166
原创 网络最大流之dicnic
#include<iostream> #include<cstring> #include<queue> #define ll long long using namespace std; #define maxn 500 int Depth[maxn + 5], Head[maxn + 5], Next[maxn + 5], V[maxn + 5], W[...
2018-10-22 13:23:28
310
原创 等比求和
You are given two integers aa and bb. Moreover, you are given a sequence s0,s1,…,sns0,s1,…,sn. All values in ss are integers 11 or −1−1. It's known that sequence is kk-periodic and kk divides n+1n+1. ...
2018-04-18 11:35:14
858
原创 POj-2624
Given are the (x, y) coordinates of the endpoints of two adjacent sides of a parallelogram. Find the(x, y) coordinates of the fourth point. Input Each line of input contains eight floating point num
2018-01-28 20:56:03
256
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人