Codeforces Round #316 (Div. 2) D. Tree Requests(dsu)
题目链接题意:对于m次询问求解以vi为根节点深度为hi的的字母能不能组合成回文串。思路:暴力dsu找一边简直就是神技!#include#definelllonglongintusingnamespacestd;inlinellgcd(lla,llb){returnb?gcd(b,a%b):a;}inlinelllcm(lla,llb){returna/gcd(a,b)*b;}intmoth[13]