优质题解 蓝桥杯基础练习VIP-阶乘计算(C++自定义函数解题) 代码解析:multiply函数实现高精度乘法。它接受一个存储数字的向量num和一个因子factor作为参数,并返回乘法结果的向量result。在multiply函数中,使用carry变量来保存进位。在for循环中,逐位进行乘法运算,并将结果加入result向量中。 题解列表 2023年07月19日 0 点赞 0 评论 1103 浏览 评分:9.9
优质题解 杨辉三角(c++代码) 摘要:杨辉三角(在这里储存为直角正三角形) > 1 > 1 1 > 1 **2 1** > 1 3 **3** 1 > …… 看到这张图应该先想一下打印直角正三角形的代码 ```cpp …… 题解列表 2023年07月19日 0 点赞 5 评论 820 浏览 评分:8.4
“扬灰(杨辉)”三角形 摘要:解题思路下一行的数等于上一行的数加上旁边的数。 注意事项:数组需要 long long 类型,不要在循环内输出,凡事要动脑筋!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!…… 题解列表 2023年07月19日 0 点赞 0 评论 539 浏览 评分:9.3
直方图(C++)简单解 摘要:参考代码:#include <iostream>#include <vector>#include <algorithm>using namespace std;int main() { int…… 题解列表 2023年07月19日 0 点赞 2 评论 449 浏览 评分:9.9
最长平台(C++)简单又实用 摘要:参考代码:#include <iostream>#include <vector>using namespace std;int main() { int n; cin >> n; //…… 题解列表 2023年07月19日 0 点赞 1 评论 637 浏览 评分:9.0
整数去重(C++)简单又实用 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <unordered_set>#include <vector>using namespace std;int m…… 题解列表 2023年07月19日 0 点赞 0 评论 1025 浏览 评分:7.3
铺地毯(C++代码解析与题解) 摘要:代码解析在 main 函数中,首先读取一个整数 n,表示总共有 n 张地毯。然后,创建一个大小为 n 的 Carpet 数组 carpets,用于存储每个地毯的信息。通过一个循环,逐个输入每个地毯的坐…… 题解列表 2023年07月19日 0 点赞 0 评论 972 浏览 评分:9.0
杨辉三角(C++)简单易懂 摘要:参考代码:#include <iostream>using namespace std;int main() { int n; while (cin >> n) { // 使…… 题解列表 2023年07月19日 0 点赞 0 评论 798 浏览 评分:9.0
回文串(C++)简单易懂 摘要:参考代码:#include <iostream>#include <string>using namespace std;bool isPalindrome(string str) { int …… 题解列表 2023年07月19日 0 点赞 0 评论 650 浏览 评分:9.9
矩阵交换行(C++)简单实现 摘要:参考代码:#include <iostream>using namespace std;int main() { int matrix[5][5]; // 5x5矩阵 // 输入矩阵 …… 题解列表 2023年07月19日 0 点赞 0 评论 912 浏览 评分:9.9