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