RE了20pts😰
#include<bits/stdc++.h>
using namespace std;
#define int long long
namespace Testify{
inline int read(){
int f(1),x(0);
char ch=getchar();
for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-1;
for(;isdigit(ch);ch=getchar()) x=(x<<1)+(x<<3)+(ch^48);
return f*x;
}
inline void Write(int x){
if(x>9) Write(x/10);
putchar(x%10+'0');
}
inline void write(int x){
if(x<0) putchar('-'),x=-x;
Write(x);
putchar('\n');
}
}
using namespace Testify;
const int mod=1e8+7;
const int N=1e6+114514;
int n,m,dp[N],x[N],y[N],z[N];
inline int qpow(int a,int b){
int res=1;
while(b){
if(b&1) res=res*a%mod;
b>>=1;
a=a*a%mod;
}
return res;
}
inline int C(int n,int m){
if(n<m) return 0;
return ((x[n]%mod*y[n-m]%mod)%mod*y[m]%mod)%mod;
}
signed main(void){
n=read(),m=read();
x[0]=y[0]=1;
int op=qpow(2,n)-1;
op=((op%mod)+mod)%mod;
// if(op<m){
// write(0);
// return 0;
// }
for(register int i=1;i<=1e6+1;i++){
x[i]=x[i-1]*i%mod;
y[i]=y[i-1]*(qpow(i,mod-2))%mod;
z[i]=qpow(i,mod-2)%mod;
}
dp[1]=0,dp[2]=0;
for(register int i=3;i<=m;i++){
dp[i]=((C(op,i-1)-dp[i-1]-(dp[i-2]*(op-(i-2))))%mod+mod)%mod*z[i]%mod;
}
write(dp[m]);
return 0;
}
求调呜呜呜😭😭😭