上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 26 下一页
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4896 【题解】 隔壁thusc画风怎么这么正常啊。。 三个操作:插入字符串,删除字符串,询问以某字符串为前缀,最早什么时候超过了d个。 用trie插入然后拿个vector维护第一次超过x个的时 阅读全文
posted @ 2017-05-27 15:37 Galaxies 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4760 【题解】 直接dp,f[i][j][k]表示到了第i个,用了j次改变,上一次出k。 直接转移,压下空间。 # include <stdio.h> # include <string.h> 阅读全文
posted @ 2017-05-27 14:50 Galaxies 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4690 【题解】 带权并查集 fa[x]表示x的父亲,a[x]表示x到x的父亲多/少多少 那么找祖先的时候算一下到祖先多少,然后路径压缩。 合并的时候注意让fa[fx]=fy的时候,a[fx]是 阅读全文
posted @ 2017-05-26 21:44 Galaxies 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4759 【题解】 排序,从大到小插入,树状数组统计。 # include <vector> # include <stdio.h> # include <string.h> # include 阅读全文
posted @ 2017-05-26 20:16 Galaxies 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4756 【题解】 dsu on tree,树状数组直接上 O(nlog^2n) # include <vector> # include <stdio.h> # include <string. 阅读全文
posted @ 2017-05-26 16:17 Galaxies 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4900 【题解】 恭喜bzoj达到40页 考场由于傻逼基数排序写挂了而gg。 竟然忘了考试前一天复习了kd-tree里面有nth_element这种东西。。 那么看看样例,找找规律就发现排序的关 阅读全文
posted @ 2017-05-25 19:46 Galaxies 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1058 【题解】 这个insert操作好py啊是不是用set就能搞搞啊。 什么?你跟我讲T了? 读入优化?还是T? 卡了卡常,发现一个东西用priority_queue就够了。。 然后12s过了 阅读全文
posted @ 2017-05-25 18:03 Galaxies 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 最后一次班班有歌声了…… 自己因为搞oi并没有参加,只是决赛的时候幕后放了放背景视频…… 不管怎么说,我们班唱的很棒啊,全部人都很棒! 说真的我为我们班骄傲 视频: https://v.qq.com/x/page/c0506ywvpon.html 阅读全文
posted @ 2017-05-24 21:40 Galaxies 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1057 【题解】 把网格图黑白染色,把原来的颜色异或黑白染色的颜色,就变成求最大0/1子矩形/正方形 以最大全1子矩形为例。 我们设a[i,j]表示第i行第j个之前有多少个连续的1。 那么我们维 阅读全文
posted @ 2017-05-24 21:37 Galaxies 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1111 【题解】 这题号注定单身。 转成四进制考虑 设f[i]表示从第i位往前的min,g[i]表示从第i位往前(第i位借1位)往前的min 那么转移随便做了。。 md还要取模,没看这个wa了3 阅读全文
posted @ 2017-05-23 22:50 Galaxies 阅读(248) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 26 下一页