随笔分类 - STL
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5738 题意:从n(n <= 1000)个点(有重点)中选出m(m > 1)个点(选出的点只看标号,不看具体坐标)合成一个集合,问集合中的点共线(可以重合)的集合个数? 思路:按照x,y双关键字排序,之后
阅读全文
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=5726 题意:有N(N <= 100,000),之后有Q(Q <= 100,000)个区间查询[l,r]。问ans1 = gcd(al,al+1,...ar) = ?,并且有多少组[l',r'] 的gcd值等
阅读全文
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=5727 题意:由2*N颗宝石构成的环(阴阳宝石均为N颗且标号均从1~N) 之后给定M组 a,b;表示阳宝石a若和阴宝石b相邻会使得阳宝石变暗,问所构成的环中阳宝石变暗的最少数量? 其中(1<=N<=9, 1<
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4358 题意:以1为根节点含有N(N <= 1e5)个结点的树,每个节点有一个权值(weight <= 1e9)。之后有m(m <= 1e5)次查询,每次查询以节点u为子树的树中,权值出现k次的权值有多少
阅读全文
摘要:Equations 题意:给定一个四元二次方程的系数a,b,c,d;问有多少个解; a, b, c, d are integers from the interval [-50,50] and any of them cannot be 0.It is consider a solution a s
阅读全文

浙公网安备 33010602011771号