05 2016 档案

摘要:传送门:http://begin.lydsy.com/JudgeOnline/problem.php?id=2796 题解:后缀自动机,很裸,但是感觉对后缀自动机还不是特别理解,毕竟我太蒟蒻,等我精通了,再写对它的理解吧。。。 还有写这道题的时候发现数组下标又时候是负数竟然不会爆。。。。。。因为这道 阅读全文
posted @ 2016-05-31 19:50 ACist 阅读(368) 评论(0) 推荐(0)
摘要:#include<algorithm> #include<iostream> #include<cstring> #include<cstdio> #define N 30000 #define M 120000 using namespace std; int ans,sz,n,m; int a[ 阅读全文
posted @ 2016-05-30 11:01 ACist 阅读(166) 评论(0) 推荐(0)
摘要:#include<algorithm> #include<iostream> #include<cstring> #include<cstdio> #define N 100005 using namespace std; int read() { int x=0; char ch; bool bo 阅读全文
posted @ 2016-05-29 20:55 ACist 阅读(152) 评论(0) 推荐(0)
摘要:做法:三维,然后这题正解是传统的cdq分治+排序+树状数组,设花的三个属性为x,y,z,我们将花按x为第一关键字,y为第二关键字,z为第三关键字排序,将属性完全相同的缩成一朵花即可,同时维护sum数组,即属形为(x,y,z)的个数,所以在维护树状数组的时候不能+1,而应该+sum[x]。排序后,后面 阅读全文
posted @ 2016-05-29 20:40 ACist 阅读(191) 评论(0) 推荐(0)
摘要:传送们:http://www.lydsy.com/JudgeOnline/problem.php?id=3196 题解:线段树+treap #include<algorithm> #include<iostream> #include<cstring> #include<cmath> #includ 阅读全文
posted @ 2016-05-29 20:33 ACist 阅读(182) 评论(0) 推荐(0)
摘要:传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1901 题解:树套树,线段树+treap(sb的我以为有多组数据。。。。。。呃呵呵呵狂RE) #include<iostream> #include<cstring> #include<cmat 阅读全文
posted @ 2016-05-29 20:31 ACist 阅读(237) 评论(0) 推荐(0)
摘要:待更。。。。。 阅读全文
posted @ 2016-05-25 14:53 ACist 阅读(162) 评论(0) 推荐(0)
摘要:1.为了记录平常训练的点滴。 2.督促学习。 3.与神犇交流学习。 4.膜拜神犇:zyf,cys,thy,cyy等 5.本蒟蒻QQ:1481632287;QQ邮箱:1481632287@qq.com; 阅读全文
posted @ 2016-05-25 10:13 ACist 阅读(314) 评论(1) 推荐(0)
摘要:传送门:[Submit] 本来写了一个详细的题解。。。。。。。。 但是TM博客园不保存。。。。。。 于是我就直接复制论文了吧。。。。 1 #include<iostream> 2 #include<cstdio> 3 #include<cstdlib> 4 #include<algorithm> 5 阅读全文
posted @ 2016-05-24 19:46 ACist 阅读(266) 评论(0) 推荐(0)
摘要:1036: [ZJOI2008]树的统计Count Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点 阅读全文
posted @ 2016-05-09 21:57 ACist 阅读(316) 评论(2) 推荐(0)
摘要:2599: [IOI2011]Race Description 给一棵树,每条边有权.求一条路径,权值和等于K,且边的数量最小. 给一棵树,每条边有权.求一条路径,权值和等于K,且边的数量最小. Input 第一行 两个整数 n, k第二..n行 每行三个整数 表示一条无向边的两端和权值 (注意点的 阅读全文
posted @ 2016-05-07 20:38 ACist 阅读(198) 评论(0) 推荐(0)
摘要:题解: 随便点分治,用一个t数组,t[i]代表有u到root的值mod3==i; 那么答案就是:t[0]*t[0]+t[1]*t[2]*2; 代码: #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> # 阅读全文
posted @ 2016-05-07 20:34 ACist 阅读(196) 评论(0) 推荐(0)
摘要:1468: Tree Description 给你一棵TREE,以及这棵树上边的距离.问有多少对点它们两者间的距离小于等于K Input N(n<=40000) 接下来n-1行边描述管道,按照题目中写的输入 接下来是k Output 一行,有多少对点之间的距离小于等于k Sample Input 7 阅读全文
posted @ 2016-05-07 20:31 ACist 阅读(203) 评论(0) 推荐(0)