自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 hdu-6324 Grab The Tree

Problem F. Grab The Tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1058    Accepted Submission(s): 680   Problem Descri...

2018-09-17 14:58:09 136

原创 zoj-4054 Traveling on the Axis

题目链接 #include<cstdio> #include<algorithm> #include<iostream> #include<cstring> using namespace std; typedef long long ll; ll f[100005]; ll sum[100005]; int main() { ll t;...

2018-09-17 14:25:27 255

原创 Spare Tire

题目链接 //题目大意:输入n,m,zhao找出1~n中与m互质的的数,将这些数当作a数组的下标,求和; //思路:打表得出,a[i]=i*i+i; 质因数不超过10个,所以先找出m的质因数,然后找出1~n中与m不互质的的数,容斥一下,得出答案 #include<cstdio> #include<algorithm> #include<iostream&gt...

2018-09-11 16:10:12 434

原创 逆元

什么是逆元: 对于a和p(a与p互质),若a*b≡1(mod p),则b称为a的逆元;   费马小定理: 假如p是质数,且gcd(a,p)=1,那么 a^(p-1)≡1(mod p)   应用: 假设a,b的范围为【1,1e5】,p=1e9+7,求(a/b)%p; b,p满足费马小定理,所以b^(p-1)≡1(mod p),即b*b^(p-2)≡1(mod p); 根据逆元din...

2018-09-11 14:01:44 144

原创 Ryuji doesn't want to study(线段树)

Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i]a[i]. Unfortunately, the longer he learns, the fewer he gets. That m...

2018-09-11 13:05:54 218

原创 hdu-6447 YJJ's Salesman(离散化+树状数组)

Problem Description YJJ is a salesman who has traveled through western country. YJJ is always on journey. Either is he at the destination, or on the way to destination. One day, he is going...

2018-09-07 20:34:36 167

原创 poj-3254 Corn Fields(状态压缩dp)

Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 20342   Accepted: 10679 Description Farmer John has purchased a lush new rectangular pasture composed of M by...

2018-09-07 18:38:28 142

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除