01 2019 档案

摘要:题目大意:一段长为n的区间,m此操作,Q为查询x所在区间的最大长度,D为将X破坏(不连通),R为将最后一个破坏的点修复(连通)。题解思路:线段树,维护3个值。1.区间前缀长度2.区间后缀长度3.区间里最长连续区间用栈存储一下破坏的点,线段树的更新维护写在代码里;100... 阅读全文
posted @ 2019-01-24 16:59 Minun 阅读(239) 评论(0) 推荐(0)
摘要:题目大意:一段区间,m此操作,0为区间里的数字开方,1为查询区间和。 题解思路:线段树,开方操作无法传递,只能进行单点操作,但不优化的化会t;想了两种优化,都可以过。注意此题的l r大小不确定!第一种:对于ll以内的数,最多开6次方就会到达1,加一个标记数组,如果开放... 阅读全文
posted @ 2019-01-23 20:21 Minun 阅读(123) 评论(0) 推荐(0)
摘要:题目大意查询一个区间输出最大值间最小值的差用线段树写需要剪枝...本来明明是一道快乐的水题..却t了就用st写了..线段树#include#include#include#include#include#include#include#include#includec... 阅读全文
posted @ 2019-01-23 16:30 Minun 阅读(96) 评论(0) 推荐(0)
摘要:题目大意:给你一段长度为 8000 的绳子,n 次操作,每次将[ l r ]区间染色为 c ,染色会覆盖掉之前的染色,所有数字不超过8000,统计最后的颜色和出现的不连续区间的个数。按颜色顺序输出。 题解思路:线段数区间染色,因为是区间染色,所以在每个2点之间又加了... 阅读全文
posted @ 2019-01-23 15:35 Minun 阅读(191) 评论(0) 推荐(0)
摘要:题目大意:在一个长度为1e7单位的板子上贴海报,后贴上的会覆盖原来贴上的,问最后能看到几个海报(露出部分也可以)思路因为板子是1e7,但给出的海报个数为1e4,所以考虑离散化,普通的离散化是会漏掉颜色,比如 1 3 1 10 1 4 7 10,所以要在长度大于1区间之... 阅读全文
posted @ 2019-01-23 09:19 Minun 阅读(82) 评论(0) 推荐(0)
摘要:http://exp-blog.com/2018/07/11/pid-1777/ 阅读全文
posted @ 2019-01-22 19:41 Minun 阅读(154) 评论(0) 推荐(0)
摘要:You are trying to program a robot to navigate through a 2-dimensional maze and find the exit. The maze can be represented as a grid wi... 阅读全文
posted @ 2019-01-22 10:00 Minun 阅读(418) 评论(0) 推荐(0)
摘要:Student Ilya often skips his classes at the university. His friends criticize him for this, but they don’t know that Ilya spends this time not watchin 阅读全文
posted @ 2019-01-21 21:09 Minun 阅读(178) 评论(0) 推荐(0)
摘要:Mr. Panda lives in Pandaland. There are many cities in Pandaland. Each city can be treated as a point on a 2D plane. Different cities are located in d 阅读全文
posted @ 2019-01-21 14:50 Minun 阅读(179) 评论(0) 推荐(0)
摘要:There is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sigh... 阅读全文
posted @ 2019-01-20 23:10 Minun 阅读(108) 评论(0) 推荐(0)
摘要:Given a n*n matrix C ij (1<=i,j<=n),We want to find a n*n matrix X ij(1<=i,j<=n),which is 0 or 1. Besides,X ij meets the following conditions: 1.X 12+ 阅读全文
posted @ 2019-01-20 10:54 Minun 阅读(158) 评论(0) 推荐(0)
摘要:Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 d[y] + w(y, x),我们需要更新d[x]的值,这对应了最短路... 阅读全文
posted @ 2019-01-19 20:35 Minun 阅读(117) 评论(0) 推荐(0)
摘要:This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you 阅读全文
posted @ 2019-01-19 16:55 Minun 阅读(105) 评论(0) 推荐(0)
摘要:年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他... 阅读全文
posted @ 2019-01-19 10:17 Minun 阅读(78) 评论(0) 推荐(0)
摘要:Subway > ***|You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Ins... 阅读全文
posted @ 2019-01-18 21:47 Minun 阅读(88) 评论(0) 推荐(0)