题目大意:
求满足以a、b为直角边,c为斜边,并且满足a + b + c n,且若m为奇数,则n为偶数,若m为偶数,则n为奇数。
枚举m、n,然后将三元组乘以i倍,保证 i * (x + y + z)在所给范围内(2 * m^2 + 2 * m*n <= L),
就可以求出所有满足条件的三元组。...
分类:
其他好文 时间:
2015-03-20 00:05:21
阅读次数:
213
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,...
分类:
其他好文 时间:
2015-03-18 15:30:48
阅读次数:
114
1 #-*- coding:GBK -*- 2 3 4 import pymssql 5 print 'Connect to the Datebase....' 6 7 conn = pymssql.connect(host='10.0.1.5' ,user='lc0049999' ,pas...
分类:
数据库 时间:
2015-03-18 13:50:24
阅读次数:
153
Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use...
分类:
其他好文 时间:
2015-03-18 12:14:34
阅读次数:
155
已知三角形重心到三边的距离和其中一边,求面积和重心到垂心的距离。计算几何。。纯数学题#include#includeint t;double x,y,z,a,s,d,r1,r2;int main(){ scanf("%d",&t); while(t--){ scanf("%...
分类:
其他好文 时间:
2015-03-16 16:00:49
阅读次数:
117
本文转自:http://linux.chinaunix.net/techdoc/beginner/2010/01/12/1153509.shtml 名称 ? ???ssh-keygen?- 生成、管理和转换认证密钥 语法 ? ???ssh-keygen?[-q] [-b?bits]?-t?type?[-N?new_pas...
分类:
其他好文 时间:
2015-03-15 18:32:47
阅读次数:
270
暂时就遇到了以下这几种,以后遇到再进行补充.DPR Delphi Project文件,包含了Pascal代码.PAS Pascal文件,Pascal单元的源代码,可以是与窗体有关的单元或是独立的单元。.DFM Delphi Form File,描述窗体或数据模块及其组件属性的二进制文件。....
Triangle问题:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.思路: 简单的动态规划问题我....
分类:
其他好文 时间:
2015-03-13 20:35:52
阅读次数:
151
https://leetcode.com/problems/pascals-triangle-ii/Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].No...
分类:
其他好文 时间:
2015-03-12 22:26:33
阅读次数:
138
https://leetcode.com/problems/pascals-triangle/GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1...
分类:
其他好文 时间:
2015-03-12 16:58:45
阅读次数:
115