链接:https://ac.nowcoder.com/acm/contest/881/E 来源:牛客网 ABBA 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 Bobo has a string of length 2(n + m) which consists of characters A and B. The string also has a fascinating prop…
#include<bits/stdc++.h>using namespace std;const long long mod=1000000007,inv=570000004;long long i,j,n,m,a[1010]/*成功几率*/,sum=0,dp[1010][1010]/*动态规划*/,def[1010]//预处理;long long qpow(long long x,long long y,long long mod)//快速幂{ long long ans=1,tmp=…