码迷,mamicode.com
首页 >  
搜索关键字:pascals triangle pas    ( 2128个结果
118. Pascal's Triangle
一、题目 1、审题 2、分析 输入一个整数 n, 返回杨辉三角的 n 行。 二、解答 1、思路: 方法一、 利用一次循环,直接计算杨辉三角的一行。再利用一次循环用 List 存储杨辉三角的 n 行。 方法二、 直接在一个 List 中计算杨辉三角的每一行。 ...
分类:其他好文   时间:2018-10-05 21:31:20    阅读次数:170
119. Pascal's Triangle II@python
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index starts from 0. Example: 原题地址: Pa ...
分类:编程语言   时间:2018-10-05 17:21:25    阅读次数:152
10.04 T4 方程+矩阵快速幂
城堡之路 (road.pas/c/cpp) 题目描述 BB要到SS的城堡去玩了。我们可以认为两座城堡位于同一条数轴上,BB的城堡坐标是0,SS的城堡坐标是N。正常情况下,BB会朝着同一个方向(即SS的城堡相对于BB的城堡的方向)走若干步之后来到SS的城堡,而且步长都为1或2。可是,今天BB在途中遇见 ...
分类:其他好文   时间:2018-10-04 20:53:29    阅读次数:153
Python交互图表可视化Bokeh:3. 散点图
散点图 ① 基本散点图绘制② 散点图颜色、大小设置方法③ 不同符号的散点图 1. 基本散点图绘制 2. 散点图不同 颜色上色/散点大小 的方法 3. 不同符号的散点图 ...
分类:编程语言   时间:2018-10-04 09:13:27    阅读次数:488
平面几何难题
IBM平面几何难题:https://www.research.ibm.com/haifa/ponderthis/challenges/August1998.html We have a triangle ABC, with a point D on side AB, E, on side BC, a ...
分类:其他好文   时间:2018-10-03 00:31:15    阅读次数:162
opengl
opengl中单位矩阵的产生方法:glm::mat4 trans; 单位矩阵进行旋转一定的角度比如30度:trans = glm::rotate(trans, 30.0f, glm::vec3(0.0f, 1.0f, 0.0f)); glDrawArrays(GL_TRIANGLES,0,3); 指 ...
分类:其他好文   时间:2018-10-02 20:25:16    阅读次数:123
18.10.01模拟赛总结
毒瘤出题人JR搞来了三道DP...... T1 jr的电脑密码 jr.cpp/.c/.pas 题目描述: 趁着jr出去吃饭,某人打算机惨jr,但他惊奇地发现,jr电脑居然有密码!每次给出两个正整数n,m,对于一个非空序列S,满足S中元素之和为n,且它们取模m互不相同,密码就是S的个数取模905229 ...
分类:其他好文   时间:2018-10-02 17:16:34    阅读次数:196
topcoder srm 738 div1 FindThePerfectTriangle(枚举)
Problem Statement You are given the ints perimeter and area. Your task is to find a triangle with the following properties: The coordinates of each ve ...
分类:其他好文   时间:2018-10-01 14:08:20    阅读次数:214
118. Pascal's Triangle@python
Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. Example: 原题地址: Pascal's Triangle 难度: Easy 题意: 杨辉三角 时间复杂度: O(n) ...
分类:编程语言   时间:2018-09-30 20:09:16    阅读次数:188
poj3417 闇の連鎖 【树上差分】By cellur925
闇の連鎖(yam.pas/c/cpp)题目描述传说中的暗之连锁被人们称为 Dark。Dark 是人类内心的黑暗的产物,古今中外的勇者们都试图打倒它。经过研究,你发现 Dark 呈现无向图的结构,图中有 N 个节点和两类边,一类边被称为主要边,而另一类被称为附加边。Dark 有 N – 1条主要边,并 ...
分类:其他好文   时间:2018-09-29 22:50:33    阅读次数:316
2128条   上一页 1 ... 30 31 32 33 34 ... 213 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!