请求加强数据???
查看原帖
请求加强数据???
705725
P_VICVIC_R楼主2024/3/17 17:02

rt,我搜索不带记忆化过了...(雾

#include <bits/stdc++.h>
#define int long long 
using namespace std;
static const int N=1000000;
int f[N];
int x[N];
int n,m,k;
inline void Run(int x){
	m++;
	if(x==1){
		return;
	}
	for(int i=(x>>1);i>0;i--){
		Run(i);
	}
}
signed main(){
	std::cin.tie(nullptr) -> sync_with_stdio(false);
	std::cout.tie(nullptr)-> sync_with_stdio(false);
	cin>>k;
	Run(k);
	cout<<m;
	return 0;
} 
2024/3/17 17:02
加载中...