自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 recastdemo源码详解 002

span 介绍关键类 rcSpan上篇博客讲到了体素化,接下来我们要把体素化生成的数据保存起来,span可以理解为拥有相同x,z坐标的体素的集合。是用链表结构保存然后这个信息会保存在rcHeightfield结构里面这里进行的操作是对可行走平面进行过滤rcFilterLowHangingWalkableObstacles walkableClimb(可攀爬高度)如果两个span的...

2019-07-26 17:34:12 958

原创 recastdemo 源码详解 001

介绍在学习recast的过程中看了很多别人的博客,感觉没有很好的贴近demo的博客,然后准备自己动手写一个。recastdemo git链接 https://github.com/recastnavigation/recastnavigationrecastdemo 编译方法 https://blog.csdn.net/memory_nothing/article/details/83589...

2019-07-25 11:01:45 2693

原创 Educational Codeforces Round 49 (Rated for Div. 2) F. Session in BSU

F. Session in BSUtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp studies in Berland State University. Soon he will have to take his ...

2018-10-10 23:27:16 199

原创 hdu 6238 Rectangle Radar Scanner 分治

Problem J. Rectangle Radar ScannerTime Limit: 20000/15000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 422 Accepted Submission(s): 142Problem DescriptionT...

2018-10-09 23:46:48 384

原创 回文树

回文树:可以用个树表示一个串里面所有为回文串的字符。贴一个大佬的理解:https://blog.csdn.net/qq_36551189/article/details/79245675我感觉跟后缀自动机有点像,分成两个树,长度为奇数的回文,长度为偶数的回文,树上的节点就代表从跟出发,炎沿树上的边走,得到的就是回文的一半。构造:每个节点有个fail指针,指向当先串的最长后缀为一个回文串,那...

2018-10-08 21:17:09 849

原创 2017 南京icpc网络赛

A number is skr, if and only if it’s unchanged after being reversed. For example, “12321”, “11” and “1” are skr numbers, but “123”, “221” are not. FYW has a string of numbers, each substring can prese...

2018-10-08 20:57:50 286

原创 hdu6326

Little Q is fighting against scary monsters in the game ``Monster Hunter’’. The battlefield consists of n intersections, labeled by 1,2,…,n, connected by n−1 bidirectional roads. Little Q is now at th...

2018-10-08 16:50:44 377

原创 hdu6249 dp+贪心

Alice’s StampsTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1038 Accepted Submission(s): 367Problem DescriptionAlice likes to collect s...

2018-10-08 16:38:53 252

原创 bzoj 1001 平面图转对偶图

1001: [BeiJing2006]狼抓兔子Time Limit: 15 Sec Memory Limit: 162 MBSubmit: 29376 Solved: 7694[Submit][Status][Discuss]Description现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的,而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼...

2018-10-04 16:42:14 198

原创 hdu 6387 AraBellaC

Problem DescriptionPrincess Arabella loves the letter C, which earned her the epithet ArraBellaC. She would like to endeavor to construct a periodic string with length n(n≤20000) to spare her tedious...

2018-10-04 15:29:47 270

原创 hdu 6346

整数规划Time Limit: 5500/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 566 Accepted Submission(s): 202Problem Description度度熊有一个可能是整数规划的问题:给定 n×n 个整数 ai,j...

2018-09-29 11:40:34 338

原创 ACM-ICPC 2018 沈阳赛区网络预赛 c Convex Hull

莫比乌斯系数容斥;把2^2,3^2,这样的数作为因子去容斥,并且把质数的平方作为特殊因子,如果一个影子可以分成奇数个不同的特殊因子,他的系数是-1,偶数个是-1,否则为0,奇数x^2的整倍数的贡献,即x^2,2*x^2,,这样的数y的贡献为(n-y)y^2,即x^4(1^2+2^2,(n/x)^2)-x^6**(1^3+2^3+3^3,(n/x)^3);注意到p为1e11,会爆longlon...

2018-09-27 14:44:02 400

原创 zoj 3229 上下限网络流

上下限网络流做法:假设有边x-y(a,b),建立临时节点ss,tt,连接x-y(0,b-a),x-ss(0,a),tt-y(0,a);最后连接t-s(0,inf);先对tt-ss跑最大流,如果tt的每一条边都是满流,那么就存在解,否则无解,如果想求最大流,只需要在残余图上跑s-t的最大流,因为ss点没有出边,并且任意点到ss的流量为0,所以可以保证在残余图上跑最大流不会影响到tt-ss的流...

2018-09-26 20:44:14 179

原创 hdu 6311 无向图 欧拉路径

Cover Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2674 Accepted Submission(s): 609 Special JudgeProblem Description The Wall has d...

2018-08-24 16:47:46 443

原创 hdu 6430 bitset _Find_first

Problem E. TeaTree Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 968 Accepted Submission(s): 367Problem Description Recently, TeaTr...

2018-08-24 08:35:43 648

原创 hdu 6044 hdu 6305 笛卡尔树

hdu6044 题意:给出每个点是某段区间的最大值,问构造一个1到n的排列,有多少种符合要求的。 做法:用笛卡尔树,如果对于一个序列,最大值可以把序列分成两段,左边一段和右边一段,然后在对这两段进行分割,,,最大值连接左右子段的最大值,就可以得到一颗树,这棵树有两个性质,左边的点比根的下标小,有点的点比跟的下标大。跟的值是子树中最大的,这就刚好符合笛卡尔树的性质,然后就可以利用题目中给出的信息...

2018-08-21 15:18:18 271

原创 hdu 6416 dp

Rikka with Seam Problem Description Seam carving is a novel algorithm for resizing images while maintaining as much information as possible from the source image.Now, Rikka is going to use seam ca...

2018-08-21 15:01:16 448

原创 Codeforces Round #257 (Div. 1) D. Jzzhu and Numbers

D. Jzzhu and Numbers time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Jzzhu have n non-negative integers a1, a2, …, an. We will call a seq...

2018-08-17 12:35:46 266

原创 hdu 6394 分块大法好 lct

Tree Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 446 Accepted Submission(s): 158Problem Description Alice and Bob are playing with ...

2018-08-14 22:33:11 375 2

原创 splay学习

一个神奇的数据结构,可以搞来搞去,还很快? 他的优化就是每次询问一个点的时候,就暴力吧这个点更新为根(用tarjan)给出的更新方式,就可以做到n次操作,平摊下来每次的复杂度是logn,证明的话请见 大牛博客我还是抱着一定的怀疑的,每次暴力更新,真的不会出问题,然后就去找了一个模板题,结果,真的没有出问题,emmmm,太强了,,, hdu 1754#include<bits/st...

2018-08-14 16:38:50 151

原创 lct学习

lct用splay维护树链剖分的重链,所以要先学会splay和树链剖分 学习splay传送门:https://blog.csdn.net/changtao381/article/details/8936765 splay复杂度分析:https://blog.csdn.net/qq_31640513/article/details/76944892 学习树链剖分传送门:https://www....

2018-08-14 11:32:15 203

原创 数论整理

人总要活成自己不喜欢的样子,然后我有一天也要学数论了,虽然也算不上学习。 线筛#include<cstdio>const int N = 100000 + 5;bool prime[N];//prime[i]表示i是不是质数 int p[N], tot;//p[N]用来存质数 void init(){ for(int i = 2; i &amp

2018-08-13 22:36:58 226

原创 模板整理

kmp#include<bits/stdc++.h>using namespace std;const int N = 1e6+100;int nex[N];int s[N],t[N],c[N];int n,m,p;void getnex(){ nex[0] = 0,nex[1] = 0; for(int i = 1;

2018-08-11 20:13:08 131

原创 2018 暑期补题列表

http://codeforces.com/group/1EzrFFyOc0/contest/738/problem/F

2018-08-11 20:12:46 128

原创 向点分治发起进攻

A - Tree POJ - 1741 Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u and v. Give an integer k,for every pair (...

2018-08-11 08:56:08 128

原创 关于右移操作

今天发现了一个问题就是当右移位数超过数据位数时,是未定义的行为,有些编译器会返回0,一些会对右移位数向数据位数取模

2018-08-10 22:49:00 707

原创 hdu 6350 Always Online 图论并查集

Problem Description Wayne is an administrator of some metropolitan area network. The network he managed can be formed into a simple connected graph with n vertices and m edges, which means the graph ...

2018-08-07 14:20:56 496

原创 hdu 6357 Hills And Valleys

Problem Description Tauren has an integer sequence A of length n (1-based). He wants you to invert an interval [l,r] (1≤l≤r≤n) of A (i.e. replace Al,Al+1,⋯,Ar with Ar,Ar−1,⋯,Al) to maximize the lengt...

2018-08-07 10:40:16 240

原创 hdu 6356 Glad You Came

Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 1039 Accepted Submission(s): 404Problem Description Steve has an integer array a of l...

2018-08-07 09:59:27 127

原创 hdu 6351 暴力贪心

Beautiful Now Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 1110 Accepted Submission(s): 394Problem Description Anton has a positiv...

2018-08-07 09:42:24 711

原创 hdu 6333 Harvest of Apples 分块大法好,

There are n apples on a tree, numbered from 1 to n. Count the number of ways to pick at most m apples.Input The first line of the input contains an integer T (1≤T≤105) denoting the number of test ...

2018-08-01 17:09:57 480 6

原创 hdu 6327 Random Sequence

Problem Description There is a positive integer sequence a1,a2,…,an with some unknown positions, denoted by 0. Little Q will replace each 0 by a random integer within the range [1,m] equiprobably. Af...

2018-07-31 15:27:36 424

原创 hdu 2365 凸包

Problem G. Interstellar Travel Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 718 Accepted Submission(s): 158Problem Description Aft...

2018-07-31 12:33:10 250

原创 SPOJ - NSUBSTR Substrings

You are given a string S which consists of 250000 lowercase latin letters at most. We define F(x) as the maximal number of times that some string with length x appears in S. For example for string ‘ab...

2018-07-28 13:09:50 136

原创 SPOJ - LCS2 后缀自动机

A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the set of lowercase letters.Substring, also called factor, is a consecutive sequence of characters oc...

2018-07-28 09:34:55 178

原创 SPOJ - LCS 后缀自动机 Longest Common Substring

A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the set of lowercase letters.Substring, also called factor, is a consecutive sequence of characters oc...

2018-07-27 13:59:44 229

原创 hdu 5558 后缀自动机

Problem Description Alice wants to send a classified message to Bob. She tries to encrypt the message with her original encryption method. The message is a string S, which consists of N lowercase let...

2018-07-26 16:58:50 321

原创 后缀自动机初步了解

经过一段时间的学习,终于对后缀自动机有所了解。 https://www.cnblogs.com/candy99/p/6374177.html 这是一个很好的博客。 留更,,,

2018-07-26 16:46:47 94

原创 zoj 2112 静态主席树,树套树 去见可修改第k大

The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest number of the given N numbers. They have developed a ...

2018-07-24 14:04:50 124

原创 hdu 5618 树套树和cdq分治

Jam’s problem again Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1746 Accepted Submission(s): 623Problem Description Jam like to sol...

2018-07-20 09:59:14 203

空空如也

空空如也

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

TA关注的人

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