1231-杨辉三角(代码简洁,思路清晰) 摘要:```cpp #include using namespace std; int a[30][30]; //1>n) //输入多组数据,按ctrl+z键退出循环 { for(in…… 题解列表 2022年10月13日 0 点赞 0 评论 241 浏览 评分:0.0
1231: 杨辉三角 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long a[35][35],n;int main(){ a[1][1]=…… 题解列表 2022年05月22日 0 点赞 0 评论 297 浏览 评分:0.0
动态规划解题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; while(scanf("%d",…… 题解列表 2022年04月07日 0 点赞 0 评论 296 浏览 评分:0.0
杨辉三角(相当于一个矩阵的下三角,利用矩阵的知识就可以了) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int num[30][30] = { 1 }; int main(){ int n;…… 题解列表 2022年02月05日 0 点赞 0 评论 220 浏览 评分:0.0
题解 1231: 杨辉三角 摘要:```cpp #include #include using namespace std; void generate(int numRows); int main() { int…… 题解列表 2021年07月28日 0 点赞 0 评论 756 浏览 评分:9.9
杨辉三角(c++)(新手) 摘要:解题思路:首先获取 1-30 的所有的数据在输出.注意事项:参考代码:#include<iostream>#include<cstdio>#include<cstring>using namespac…… 题解列表 2021年05月15日 0 点赞 0 评论 711 浏览 评分:9.9
杨辉三角-题解(C++代码) 摘要:```cpp #include using namespace std; int main(){ int n; while(cin>>n){ int p[n…… 题解列表 2020年04月18日 0 点赞 0 评论 532 浏览 评分:0.0
杨辉三角-题解(C++代码) 摘要:解题思路: 思路很一般,利用二位数组来存储三角阵。利用两个嵌套的for循环就可以将整个三角阵输入到二位数组中,在二维数组的逐层输入的过程中。先判断本层数组的首尾,给本层数组的首尾都赋值为1,然后再对…… 题解列表 2019年07月27日 0 点赞 0 评论 1317 浏览 评分:6.0
杨辉三角 (C++代码) 摘要:解题思路: 之前我写了一个用找到的规律来写的杨辉三角形的代码,想了一下又想到当初学排列组合数时说杨辉三角形中的数字就是排列组合数,所以用组合数又写了一次。 …… 题解列表 2019年04月11日 2 点赞 1 评论 1554 浏览 评分:9.9
杨辉三角 (C++代码) 摘要:解题思路: 给出两个代码,第一个是解决这个题目的,但是写完之后觉得没有体现出杨辉三角形的对称性,所以解决完这个题目后,添加了少少的几行代码,让它真正成为一个对称的三角形。但是到最后由于…… 题解列表 2019年04月11日 9 点赞 0 评论 3050 浏览 评分:9.8