[杂题 图论 构造] Codeforces #639B. Bear and Forgotten Tree 3
瞎搞题。从1往下构造出两条长度分别为d,h−d的链,然后剩下的点全部堆到某个点下面,注意当d=h时特殊考虑一下。#include#includeusingnamespacestd;intn,H,D;intmain(){//freopen("cf639B.in","r",stdin);//freopen("cf639B.out","w",stdout);scanf("%d%d%d",&n,&H,&D