随笔分类 - 倍增
摘要:vjudge题目传送门 luogu题目传送门 题解 首先,我们考虑如何统计所有边权都是1的经过x条边的路径总数。很简单,构造转移矩阵我们只需要相邻的两个点u->v,(u,v)++,再设一个计数器代表路径总数,(u,计数器)++,最后再 (计数器,计数器)=1。初始矩阵...
        阅读全文
                
摘要:Battle over CitiesDescriptionIt is vitally important to have all the cities connected by highways in a war, but some of them are destr...
        阅读全文
                
摘要:这里是我倍增的练习记录,大多都是水题……也有一些混合了其它算法的。= = silly……顺序可能有些错乱,并不是按照难度来排的。 T1 hdu3710 倍增+树剖 #include#include#include#includeusing namespace std;...
        阅读全文
                
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号