- 博客(12)
- 收藏
- 关注
原创 hdu 6304 数学题+找规律+卡时间
#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll mod=1e9+7;ll ans,sum,inv2=500000004;ll cal(ll n){ sum=0; while(n) { sum+=n; n>>=...
2018-08-31 11:13:31 192
原创 hdu 6438 贪心+优先队列
#include<bits/stdc++.h>using namespace std;typedef long long ll;map<int,int> f;int main(){ int t,n,cnt,tp; ll ans; scanf("%d",&t); while(t--&&scanf("%d",&...
2018-08-30 17:58:25 151
原创 hdu 6424 数学
#include<bits/stdc++.h>using namespace std;const int inf=0x3f3f3f3f;pair<int,int> a1,a2,b1,b2;pair<pair<int,int>,pair<int,int> > aa,bb;pair<int,int> mp(int a,...
2018-08-24 20:27:19 204
原创 hdu 6428 莫比乌斯反演+积性函数线性筛
#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e7+5;const ll mod=1<<30;int pow_bit[maxn],pow_num[maxn],f[maxn],f2[maxn],f3[maxn],prime[maxn],tot;boo...
2018-08-24 17:49:16 244
原创 hdu 6435 枚举好题
#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=6;const int inf=0x3f3f3f3f;ll a[1<<maxn+5],b[1<<maxn+5];int t,n,m,k,x[maxn+5],val;void del(ll *...
2018-08-22 17:49:39 305
原创 hdu 6397 容斥(我写NTT+快速幂还是T了)
#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll mod=998244353;const int maxn=2*1e5+5;ll fact[maxn],f[maxn],inv[maxn],cal[maxn];void init(){ fact[0]=f[0]=inv[...
2018-08-15 18:11:07 503
原创 hdu 6395 整数分块+矩阵快速幂
#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll mod=1e9+7;typedef struct node{ ll mat[4][4];}matrix;matrix mul(matrix a,matrix b){ matrix res; for(i...
2018-08-13 21:28:51 351
原创 hdu 6363 数论多种知识集合(欧拉降幂+莫比乌斯反演+约数枚举+组合数计算+快速幂+斐波那契+GCD加强版)
#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll mod=1e9+7;const int maxn=2*1e6+5;const int maxm=1e6+5;ll fact[maxn],f[maxn],inv[maxn];bool check[maxm];int mu[ma...
2018-08-08 23:56:19 327
原创 hdu 6356 区间更新反转ST表,对时间卡的很严格
#include<bits/stdc++.h>using namespace std;const int maxn=1e5+5;unsigned x,y,z,mp[maxn][18];int dis[maxn];unsigned RNG61(){ x=x^(x<<11); x=x^(x>>4); x=x^(x<<...
2018-08-07 18:19:44 131
原创 牛客网 暑期集训第五场 树状数组+概率思维
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述Kanade has n boxes , the i-th box has p[i] probability to have an diamond of d[i] size.At the beginning , Kanade has...
2018-08-02 19:05:18 178
原创 hdu 6330 模拟水题
#include<bits/stdc++.h>using namespace std;const int maxn=105;int t,n,m,k;char mp[maxn][maxn];int main(){ scanf("%d",&t); while(t--&&scanf("%d%d%d",&n,&m,&...
2018-08-02 17:52:26 370
原创 hdu 6333 莫队算法+组合数学
#include<bits/stdc++.h>using namespace std;typedef long long ll;const ll mod=1e9+7;const ll maxn=1e5+5;ll fact[maxn],f[maxn],inv[maxn];struct node{int l,r,index,block;ll res;}a[maxn];int...
2018-08-02 16:51:57 166
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人