自我感觉代码良好,qwq……
#include<bits/stdc++.h> using namespace std; int n,x; int solve(int x,int y){ if(!x) return 1; else if(x==1) return 2*y; else return 2*x*solve(x-1,y)-2*(x-1)*solve(x-2,y); } int main(){ cin>>n>>x; cout<<solve(n,x); }