摘要:
"传送门" Solution 十分简单的树形dpQwQ,转移关系:父亲染了儿子不用染 只需要确定根就是简单树形dp,而其实根可以随便取一个非叶子节点 可以分情况讨论发现答案并不会改变 Code cpp //By Menteur_Hxy include include include include 阅读全文
摘要:
"传送门" Solution 好水的题(ーー;) Code cpp //By Menteur_Hxy include include include include include include include include include define Re register define M 阅读全文
摘要:
"传送门" Solution 矩阵乘法新姿势qwq 我们知道当边权为1是我们可以利用矩阵快速幂来方便的求出路径数 那么对于边权很小的时候,我们可以将每个点都拆成若干个点 然后就将边权不为1转化为边权为1了 Code 阅读全文
摘要:
"传送门" Solution 把状态都记上暴力转移即可 Code cpp //By Menteur_Hxy include include include include include include include include define Re register define Ms(a,b 阅读全文
摘要:
"传送门" Solution 题目是最长路,其实是最短路ヽ(ー_ー)ノ 把进入障碍点的边设为1,其他为0。枚举每个点为起点找距离 include include include include include include include define Re register define Ms( 阅读全文
摘要:
"传送门" Solution 折半搜索裸题,注意$long long$ Code 阅读全文