3028: 数的计数(Noip2001) 递推前缀和 摘要:解题思路:自然数的个数递推式:h[i] = h[1] + h[2] +...+ h[i/2]; s[i] 为h[i] 前缀和,所以h[i] = 1 + s[i/2](扩展出的自然数包括i本身); 计算…… 题解列表 2023年12月27日 0 点赞 0 评论 378 浏览 评分:9.9
指针遍历,分类记录 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string str; g…… 题解列表 2023年12月26日 0 点赞 0 评论 148 浏览 评分:0.0
混子代码你值得拥有! 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ char arr[4] = {0}; for(int i …… 题解列表 2023年12月26日 0 点赞 0 评论 144 浏览 评分:0.0
利用指针解决字符数组 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string str; g…… 题解列表 2023年12月26日 0 点赞 0 评论 213 浏览 评分:0.0
转置嘛,就是互换行列呗 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[3][3]; int *p = &arr[…… 题解列表 2023年12月26日 0 点赞 0 评论 167 浏览 评分:0.0
密码(没法偷懒了,大写字母可以用isupper函数,小写字母可以用islower函数,数字可以用isdigit函数,特殊符号没法用ispunct函数) 摘要:解题思路:ispunct()检查给定字符是否是当前C语言环境中的标点符号默认的C语言环境的字符!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~分类为标点符号明显比题目要求得多了…… 题解列表 2023年12月26日 0 点赞 0 评论 150 浏览 评分:0.0
循环找公因数和公倍数 摘要:解题思路:inline 为内联函数注意事项:参考代码:#include<iostream>using namespace std;inline int find_max(int a,int b){ …… 题解列表 2023年12月26日 0 点赞 0 评论 251 浏览 评分:0.0
2824: 求出e的值 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; long long int jc(int n)…… 题解列表 2023年12月26日 0 点赞 0 评论 225 浏览 评分:0.0
指针遍历解决 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;//输入10个数字,然后逆序输出。int main(){ int arr[10] = {…… 题解列表 2023年12月26日 0 点赞 0 评论 243 浏览 评分:0.0
3027: 集合的划分题解(DP) 摘要:解题思路:递推公式- 将n - 1个子集放入k - 1个盒子, 如果第n个子集不在n- 1子集中, 那么方案数 f[n-1][k-1], 如果第n个子集在n-1个子集之中,那么方案数k * f[n-1…… 题解列表 2023年12月26日 0 点赞 0 评论 347 浏览 评分:9.9