大佬求助!!!
查看原帖
大佬求助!!!
1097314
封禁用户楼主2024/5/31 16:54

自我感觉代码良好,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);
}
2024/5/31 16:54
加载中...