摘要:
考试遇到一道题: 有一棵n个点的有根树,每个点有一个颜色,每次询问给定一个点$u$和一个数$k$,询问$u$子是多少个不同颜色节点的$k$级祖先。n include include include include include define R(a,b,c) for(register int a 阅读全文
摘要:
参考了 "I_AM_HelloWord" 的代码,$f[i][j]$表示转态$i$时最后一刷为$j$的最小代价,上面的块可用暴力填涂,注意边界 cpp include include include include include define R(a,b,c) for(register int a 阅读全文