2018年7月27日

摘要: 链接:https://www.nowcoder.com/acm/contest/140/G White Cloud placed n containers in sequence on a axes. The i-th container is located at x[i] and there a 阅读全文
posted @ 2018-07-27 14:26 Lis~ 阅读(251) 评论(0) 推荐(0) 编辑
 

2018年7月26日

摘要: 链接:https://www.nowcoder.com/acm/contest/141/E来源:牛客网 Eddy likes to play with string which is a sequence of characters. One day, Eddy has played with a 阅读全文
posted @ 2018-07-26 21:58 Lis~ 阅读(318) 评论(0) 推荐(1) 编辑
 
摘要: 链接:https://www.nowcoder.com/acm/contest/141/H来源:牛客网 Eddy has solved lots of problem involving calculating the number of coprime pairs within some rang 阅读全文
posted @ 2018-07-26 21:38 Lis~ 阅读(220) 评论(0) 推荐(0) 编辑
 
摘要: White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The plant in the j-th column of the i-th row belongs the 阅读全文
posted @ 2018-07-26 10:42 Lis~ 阅读(251) 评论(0) 推荐(0) 编辑
 

2018年7月24日

摘要: 一,二维树状数组之单点修改矩阵查询 我们坐标轴也有一维二维,就是在线得基础上扩展到平面 我们的树状数组也是一样的道理,一维的时候我们存的是一个区间的和 二维就是存的一个矩阵 https://blog.csdn.net/qq_39553725/article/details/76696168 http 阅读全文
posted @ 2018-07-24 19:29 Lis~ 阅读(210) 评论(0) 推荐(0) 编辑
 
摘要: 树状数组的区间修改单点查询 树状数组其实本质还单点修改区间查询,但是我们怎么延伸到这个呢,我们建立一个差分数组, 比如: a[10]={4, 6, 7, 5, 1, 6, 3, 4, 2, 7} 对应的差分数组 c[10]={4, 2,1,-2,-4, 5,-3, 1,-2, 5} c[i]=a[i 阅读全文
posted @ 2018-07-24 18:50 Lis~ 阅读(317) 评论(0) 推荐(0) 编辑
 
摘要: 一,前言 之前只会树状数组的一个区间求和,还是记得模板,这次在多校遇到一个用二维树状数组的题,就决心好好把树状数组搞一下,就发现树状数组有很多骚操作。 二,应用 1.树状数组的单点修改区间查询 这个是最常见的树状数组,我们很多书很多博客都是以这个作介绍,下面我也给大家讲一下,首先树状数组也是基于二分 阅读全文
posted @ 2018-07-24 17:00 Lis~ 阅读(177) 评论(0) 推荐(0) 编辑
 

2018年7月20日

摘要: 【莫队算法】 ·莫队算法被大家称为“优雅的暴力” ·排序巧妙优化复杂度,带来NOIP前的最后一丝宁静。几个活蹦乱跳的指针的跳跃次数,决定着莫队算法的优劣…… ·目前的题型概括为三种:普通莫队,树形莫队以及带修莫队。 照常在这引用两篇我学习莫队的博客 https://www.cnblogs.com/P 阅读全文
posted @ 2018-07-20 21:45 Lis~ 阅读(543) 评论(0) 推荐(0) 编辑
 
摘要: 1、概述 Trie树,又称字典树,单词查找树或者前缀树,是一种用于快速检索的多叉树结构,如英文字母的字典树是一个26叉树,数字的字典树是一个10叉树。 我理解字典树是看了这位大佬博客。还不了解字典树的可以先进去学习一下 https://www.cnblogs.com/TheRoadToTheGold 阅读全文
posted @ 2018-07-20 11:51 Lis~ 阅读(2318) 评论(0) 推荐(0) 编辑
 

2018年7月18日

摘要: 题目链接:http://codeforces.com/contest/1004/problem/B B. Sonya and Exhibition time limit per test 1 second memory limit per test 256 megabytes input stand 阅读全文
posted @ 2018-07-18 11:22 Lis~ 阅读(204) 评论(0) 推荐(0) 编辑