自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

rain_falls

NOIP

  • 博客(22)
  • 资源 (1)
  • 收藏
  • 关注

转载 MARK

notonlysuccess

2018-01-12 19:58:52 132

原创 冲刺NOIp2016算法模板

冲刺NOIp算法模板数据结构栈int strack[maxn];int head;bool b[maxn];void push(int x){ strack[++head]=x; b[x]=true;};int pop(){ int ret; ret=strack[head--]; b[ret]=false;

2017-11-09 23:55:51 474

原创 treap

比较快的非线性筛法for(int a=2;a<=n;a++) for(int b=a+a;b<=n;b++) not_prime[b]=true;O(nlogn)for(int a=2;a<=n;a++) if(!not_prime[a]) for(int b=a+a;b<=n;b++) not_prime[b]=true; //true不是质数O(nloglogn)

2017-10-30 11:07:41 256

原创 数据结构板子

树堆二叉堆堆排序RMQ(区间最值)#include<iostream>#include<cstdio>#define MAXN 100005using namespace std;int n,m;long long a[MAXN],d[MAXN][18];inline int read (){ int n=0; char ch=getchar(); while(

2017-10-21 19:59:27 292

转载 数论板子

//筛法求MAXN范围以内的素数表,其中需要借用一个bool数组vis void prime_table() { int i,j; for(i = 2;i <= MAXN;i++) { if(!vis[i]) { prime[++cnt] = i; //cn

2017-10-21 19:09:35 577

原创 树状数组

#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int n,m;int sum[500005];inline int lowbit (int x){ return x&-x;}int add (int k,int a){ whil

2017-10-21 16:21:10 132

原创 RMQ

#include<iostream>#include<cstdio>#define MAXN 100005using namespace std;int n,m;long long a[MAXN],d[MAXN][18];inline int read (){ int n=0; char ch=getchar(); while(ch<'0'||ch>'9') c

2017-10-20 18:58:14 124

原创 SPFA

自认为优美的SPFA#include<iostream>#include<cstdio>#define maxm 500005#define maxn 10005#define INF 0x5fffffffusing namespace std;int n,m,s;struct Edge{ int next; int to; int w;}e[maxm] ;

2017-10-05 01:22:00 140

原创 递归

递归的定义

2017-10-02 15:34:34 145

原创 二分图匹配--绿色算法

匈牙利人神奇的算法           ——钟长者

2017-07-21 21:03:45 850

原创 还是小套路。。

啦啦啦第一波 网站安利 线段树notonlysuccess codeforces tarjian KMP1 KMP2 KMP3 TRIE1 TRIE2 String Manacher AC自动机1 AC自动机2

2017-07-21 19:36:07 195

原创 贪心

在NOIP中的贪心

2017-07-21 18:12:24 252 1

原创 二分算法

介绍 在一个单调(递增或递减)的区间[a1,an]中查找元素x,每次将区间分为左右长 度相等的两部分,判断解在哪个区间中并调整区间上下界,重复直至找到x。 复杂度O(lg n) 作用:查找元素是否存在(找出位置或值)求满足条件的最值。 算法原理 1 2 3 4 5 6 7 8 9 10 11 7 10 21 25

2017-07-18 19:44:30 199

原创 并查集

算法思路用于海量集合的合并及查询。 精髓在于路径压缩。 具体瞅代码##代码#include<iostream>#include<cstdio>using namespace std;#define MAXN 200001int f[MAXN];int m,n,x,y,q;int find1(int x)//非递归,不会爆栈,但很可能超时{ while(f[x]!=x)

2017-07-18 19:08:29 181

原创 线段树

今天来说线段树(虽然之前kmp的坑还没有填) 不管啦~开新坑

2017-03-03 21:40:30 190

翻译 FRC(FIRST Robotics Competition) Pneumatics Manual 气动说明

frc气动

2017-02-24 22:09:25 4308

原创 LCA模板题

LCA

2017-02-24 21:00:26 646

原创 cpp输出颜色

color

2017-02-23 18:29:01 423

原创 没有上司的舞会

1352 没有上司的舞会

2017-02-17 23:29:34 320

原创 调程序的小工具--数据制造,对拍和查看程序运行时间

数据制造,对拍及查看程序运行时间

2017-02-11 23:04:11 991

原创 看看你的RP--猴子排序

相信猴子给你排的序么

2017-02-11 21:15:54 1820

转载 kmp(pre)

KMP

2017-02-11 10:25:05 257

frc气动使用说明

frc启动翻译

2017-03-05

空空如也

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

TA关注的人

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