摘要:
public class Main{ static int N=999999; public static void main(String[] args) { InputReader in=new InputReader(System.in); int[] time=new int[N]; int 阅读全文
摘要:
问题:求一个二叉树,x节点到y节点的距离 算法:找到xy最近的父节点,res=cent[x]+cent[y]-2*cent[lcm(x,y)] class Node{ int l; int r; int cent; int father; } static int lcm(int u,int v) 阅读全文