自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 猪国杀

#include <iostream>#include <cstdio>#include <cstring>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=get...

2019-10-10 17:01:32 185

原创 luogu P1948 电话线

#include <iostream>#include <cstdio>#include <queue>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getch...

2019-10-06 16:17:54 123

原创 luogu P1144 最短路计数

#include <iostream>#include <cstdio>#include <queue>using namespace std;int read (){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getc...

2019-10-06 16:16:56 142

原创 A+B problem (网络流)

#include <iostream>#include <cstdio>#include <queue>using namespace std;inline int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if...

2019-05-12 16:56:20 478

原创 luogu P2602 数字计数

数位DP#include <iostream>#include <cstdio>using namespace std;typedef long long LL;const int N=15;LL a,b,o[N],f[N],num[N],ans1[N],ans2[N];LL read(){ LL x=0,f=1; char c=getchar()...

2019-05-11 15:44:03 177

原创 luogu P1352 没有上司的舞会

树形dp遍历树#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } ...

2019-05-11 11:22:54 110

原创 luogu P4290 玩具取名

f [ i ] [ j ] [ c ] 表示i到j的字符能否由c转化到#include <iostream>#include <cstdio>#include <map>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0...

2019-05-11 10:43:30 83

原创 luogu P1439 最长公共子序列

按顺序重新赋值最长上升子序列#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(...

2019-05-11 10:41:17 109

原创 luogu P1020 导弹拦截

最长不上升子序列+最长上升子序列#include <iostream>#include <cstdio>using namespace std;const int N=1e5+5,M=5e5+5;int tre[M*4],a[N],n,m=5e5+5,a1,v;void del(int k,int l,int r){ tre[k]=0; if(l==...

2019-05-11 10:39:31 106

原创 luogu P1471 方差

推式子实数读入就别用整数的快读了。。#include <iostream>#include <cstdio>#include <cmath>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c...

2019-05-10 17:11:44 94

原创 luogu P3792 由乃与大母神原型和偶像崇拜

区间哈希+特判#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } whi...

2019-05-10 15:39:56 119

原创 luogu P2824 排序

线段树+二分#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } whil...

2019-05-10 11:27:31 110

原创 luogu P4513 小白逛公园

#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } while(c>='...

2019-05-10 10:54:41 105

原创 luogu P1197 星球大战

离线做相反处理 并查集#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); }...

2019-05-09 17:27:38 122

原创 luogu P4198 楼房重建

合并状态分情况#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } whi...

2019-05-08 17:45:58 185

原创 kmp

#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int N=1e6+5;int n,m,ret[N];char a[N],b[N];int main(){ scanf("%s%s",a,b); n=strlen(a); m...

2019-05-07 15:57:44 153

原创 game

缩点找环#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } while(...

2019-05-07 14:30:21 194

原创 sort

线段树求最长上升子序列#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); }...

2019-05-07 14:29:49 139

原创 聪聪可可

#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } while(c>='...

2019-05-07 14:28:44 118

原创 lucky

排列组合#include <iostream>#include <cstdio>#include <map>#define LL long longusing namespace std;int read(bool &f){ f=1; int x=0; char c=getchar(); while(c<'0'||c&g...

2019-05-07 14:27:27 184

原创 tour

单源最短路#include <iostream>#include <cstdio>#include <queue>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; ...

2019-05-07 14:26:38 218

原创 sum

等比数列求和#include <iostream>#include <cstdio>#define LL long longusing namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; ...

2019-05-07 14:25:41 328

原创 树上游戏

#include <iostream>#include <cstdio>#define LL long longusing namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar...

2019-05-07 14:23:35 87

原创 点分治

#include<iostream>#include<cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } while(c>='0'...

2019-05-03 17:16:08 60

原创 引水入城

每个蓄水厂覆盖的干旱城市是连续的广搜+一些小处理#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;int read(){ int x=0,f=1; char c=getchar(); ...

2019-04-30 16:43:41 58

原创 油滴扩展

i 和 j !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#include <iostream>#include <cstdio>#include <cmath>using namespace std;int read(){ int x=0,f=1; char c=getchar();...

2019-04-30 14:32:44 123

原创 斐波那契公约数

gcd(f[i],f[j])=f[gcd(i,j)]#include <iostream>#include <cstdio>#define LL long longusing namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { ...

2019-04-30 08:02:21 82

原创 时间复杂度

w可以是两位数#include <iostream>#include <cstdio>#include <cstring>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='n') ret...

2019-04-29 15:29:27 60

原创 独木桥

#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } while(c...

2019-04-29 11:31:50 271

原创 均分纸牌

#include <cstdio>#include <iostream>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=g...

2019-04-29 10:38:16 54

原创 能量项链

区间dp#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } while(...

2019-04-29 09:46:06 159

原创 金明的预算方案

附件背包#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); } while(...

2019-04-29 09:00:33 134

原创 花生采摘

巧妙的水题#include <iostream>#include <cstdio>#include <algorithm>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-...

2019-04-28 17:03:02 82

原创 小B的询问

莫队#include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <algorithm>#define LL long long using namespace std;int read(){ int x=0,f=1;...

2019-04-28 09:31:19 75

原创 Luogu P2522 Problem b

反演+容斥#include <iostream>#include <cstdio>#define LL long longusing namespace std;LL read(){ LL x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=...

2019-04-27 15:10:52 61

原创 [POI2007]ZAP-Queries

莫比乌斯反演#include <iostream>#include <cstdio>#define LL long longusing namespace std;LL read(){ LL x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c...

2019-04-27 14:37:52 83

原创 luogu P1147 连续自然数和

一顿乱推出结果#include <iostream>#include <cstdio>#include <cmath>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1;...

2019-04-10 17:28:37 68

原创 luogu P1403 约数研究

1到n中i的倍数有n/i个#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') f=-1; c=getchar(); }...

2019-04-10 17:13:37 73

原创 luogu P2257 YY的GCD

莫比乌斯反演为什么long long开多了会TLE QWQ#include <iostream>#include <cstdio>#define LL long longusing namespace std;int read(){ int x=0,f=1; char c=getchar(); while(c<'0'||c>'9')...

2019-04-10 15:43:16 90

原创 luogu P1047 校门外的树O(n)

对于输入的每对l和r,将s[l]加一,s[r+1]减一,然后从0到n扫描,s不断加上a[i],所以s代表当前的i位置被多少条道路覆盖,对于每个i,如果s值为0,那么答案ans就加一#include <iostream>#include <cstdio>using namespace std;int read(){ int x=0,f=1; char c=...

2019-04-10 14:44:43 89

空空如也

空空如也

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

TA关注的人

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