摘要: 题意问你有多少个长度为2*(n+m)的字符串满足A和B数量相等 且可以分割为n个AB子序列和m个BA子序列 很容易得出前n个A肯定是可以给AB的 后面的m个A给BA 所以当一个字符串满足条件时要满足任意前缀满足 A的个数不大于B的个数+n B的个数不大于A的个数+m 这两个条件 则我们把B当Y轴 A 阅读全文
posted @ 2019-10-05 15:04 Aragaki 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Roads In ICPCCamp there were $n$ towns conveniently numbered with $1, 2, \dots, n$ connected with $m$ roads. Bobo would like to know the number of way 阅读全文
posted @ 2019-10-05 14:16 Aragaki 阅读(259) 评论(0) 推荐(0) 编辑