HBC51067BetaGo,图论,拓扑排序ABBA题解 (bobohasastringoflength)

你曾走过我的故事 算法基础篇 48 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
Bobo has a string of length 2 which consists of characters `A` and `B`. The string also has a fascinating property: it can be decomposed into subsequences of length 2, and among the subsequences n of them are `AB` while other m of them are `BA`. Given n and m, find the number of possible strings modulo .

Bobo has a string of length 2(n + m) which consists of characters `A` and `B`. The string also has a fascinating property: it can be decomposed into (n + m) subsequences of length 2, and among the (n + m) subsequences n of them are `AB` while other m of them are `BA`. Given n and m, find the number of possible strings modulo (109+7)(10^9+7)(109+7).

HBC51067BetaGo,图论,拓扑排序ABBA题解
(bobohasastringoflength)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC51067BetaGo 图论 拓扑排序ABBA题解