社区讨论
请求加强数据???
P1028[NOIP 2001 普及组] 数的计算参与者 1已保存回复 1
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 1 条
- 当前快照
- 1 份
- 快照标识符
- @ltvah646
- 此快照首次捕获于
- 2024/03/17 17:03 2 年前
- 此快照最后确认于
- 2024/03/17 19:03 2 年前
rt,我搜索不带记忆化过了...(雾
CPP#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;
}
回复
共 1 条回复,欢迎继续交流。
正在加载回复...