摘要:        
题意: 分析:删去一个数,能得到一个新结果,枚举删去的点,左右两边预处理好。 #include <bits/stdc++.h> using namespace std; const int maxn = 100000+5; typedef long long LL; int a[maxn]; int    阅读全文
        
            posted @ 2017-07-24 21:33
小草的大树梦
阅读(209)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
题意:动态查询区间的gcd,和gcd的值的个数。 分析:gcd的查找可以线段树,val(node) = gcd(val(left),val(val)),我是用ST表搞的。 然后查询这个值的区间有多少个。 简单说就是,这个gcd 不会很多,可以分区间hash好。 二分写的很糟。 #include <b    阅读全文
        
            posted @ 2017-07-24 20:00
小草的大树梦
阅读(126)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
题意:求最小生成树,和任意两个点之间距离的期望 官方题解: 最后求两遍点的积的时候,还是要判断父子关系。 注意 long long #include <bits/stdc++.h> using namespace std; typedef long long LL; const int maxn =    阅读全文
        
            posted @ 2017-07-24 16:22
小草的大树梦
阅读(317)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
#include <bits/stdc++.h> using namespace std; typedef long long LL; int gcd(int a,int b) { return b ==0 ? a : gcd(b,a%b); } const int maxn = 55; int m    阅读全文
        
            posted @ 2017-07-24 14:38
小草的大树梦
阅读(155)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
Description You are a boss who has N employers. One day, you have a message and you want to tell it to M employers of yours. As you are a funny man, y    阅读全文
        
            posted @ 2017-07-24 10:13
小草的大树梦
阅读(403)
评论(0)
推荐(0)
        
        
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号