3029: 逆波兰表达式 摘要:解题思路:使用栈, 遇到数字入数字栈, 遇到操作符, 在操作符栈不为空,并且数字栈的长度大于等于2时,出栈计算,结果入栈注意事项: 最后在操作符不为空时,循环出栈计算参考代码:#include<ios…… 题解列表 2023年12月28日 0 点赞 0 评论 406 浏览 评分:9.9
题解 2851: 合法C标识符 摘要: #include using namespace std; int n; char a[200],m[200]; int main() { …… 题解列表 2023年12月27日 0 点赞 0 评论 208 浏览 评分:0.0
题解 2876: 矩阵交换行 摘要: #include using namespace std; int n,m; int a[6][6]; int main(){ for(in…… 题解列表 2023年12月27日 0 点赞 0 评论 233 浏览 评分:0.0
题解 2848: 基因相关性 摘要: #include using namespace std; int e; double c,z; char a[510],b[510]; in…… 题解列表 2023年12月27日 0 点赞 0 评论 169 浏览 评分:0.0
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 评论 368 浏览 评分:9.9
指针遍历,分类记录 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string str; g…… 题解列表 2023年12月26日 0 点赞 0 评论 142 浏览 评分:0.0
混子代码你值得拥有! 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ char arr[4] = {0}; for(int i …… 题解列表 2023年12月26日 0 点赞 0 评论 137 浏览 评分:0.0
利用指针解决字符数组 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string str; g…… 题解列表 2023年12月26日 0 点赞 0 评论 202 浏览 评分:0.0
转置嘛,就是互换行列呗 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[3][3]; int *p = &arr[…… 题解列表 2023年12月26日 0 点赞 0 评论 160 浏览 评分:0.0
循环找公因数和公倍数 摘要:解题思路:inline 为内联函数注意事项:参考代码:#include<iostream>using namespace std;inline int find_max(int a,int b){ …… 题解列表 2023年12月26日 0 点赞 0 评论 243 浏览 评分:0.0