摘要:        
/*hdu6038[找规律+循环节] 2017多校1*/ #include using namespace std; typedef long long LL; const double eps=1e-8; const int inf=0x3f3f3f3f; const int mod=1000000007; int n,m,lop,kase=1,maxlop; int a[100005],b[...    阅读全文
posted @ 2017-08-06 21:09
UnderSilence
阅读(172)
评论(0)
推荐(0)
        
            
        
        
摘要:        
/*hdu6035[dfs+思维] 2017多校1*/ //合并色块, 妙啊妙啊 #include using namespace std; const double eps=1e-8; const int inf=0x3f3f3f3f; typedef long long LL; vectorG[200005]; LL sum[200005]; int c[200005],son[200005...    阅读全文
posted @ 2017-08-06 21:07
UnderSilence
阅读(231)
评论(0)
推荐(0)
        
            
        
        
摘要:        
/*hdu6034[模拟] 2017多校1*/ //暴力模拟26个26进制数即可, 要注意进位 #include using namespace std; typedef long long LL; const double eps=1e-8; const int inf=0x3f3f3f3f; struct node{ char num[100005]; int ch,high...    阅读全文
posted @ 2017-08-06 21:04
UnderSilence
阅读(159)
评论(0)
推荐(0)
        
            
        
        
摘要:        
看了标答感觉思路清晰了许多,用并查集来维护全联通块的点数和边权和。 用另一个up[]数组(也是并查集)来保证每条边不会被重复附权值,这样我们只要将询问按权值从小到大排序,一定能的到最小的边权和与联通块中的点数。 下面是过程分析。过程中一共运用了两个并查集。 [数据]110 31 21 32 42 5    阅读全文
posted @ 2017-08-06 13:34
UnderSilence
阅读(234)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号