https://leetcode.com/problems/trapping-rain-water/#/solutions Here is my idea: instead of calculating area by height*width, we can think it in a cumul ...
分类:
移动开发 时间:
2017-07-04 13:21:11
阅读次数:
144
HDU 3340 Rain in ACStar 题目链接 题意:给定几个多边形(3-5边形),然后中间有一些询问。询问一个区间的总面积 思路:多边形切割为梯形,梯形的面积为上底d1 + 下底d2 乘上 高度 / 2。两个梯形面积累加的话,能够等价为上底下底累加,所以就能够用线段树搞了,然后给定的多边 ...
分类:
其他好文 时间:
2017-07-02 13:06:17
阅读次数:
206
#文本内容 Rain 80000\n Egon 50000\n Yuan 30000\n salary = open("salaryinfo.txt", "r+", encoding="UTF-8") salary_list = [] #定义一个新的列表值。 for line in salary.r... ...
分类:
其他好文 时间:
2017-07-01 01:10:11
阅读次数:
256
本红包雨项目是基于HTML5的游戏框架Phaser写的,最终形成的是一个canvas,所以性能很好,但是必须要说的是这个框架比较大,压缩后也有700K左右,所以请慎用. 代码地址: https://github.com/AmosXu/red-packet-rain 1. 效果展示 图片依次是倒计时页 ...
分类:
其他好文 时间:
2017-06-29 20:29:57
阅读次数:
242
JS变量作用域特点: a、JS变量作用域是基于其特有的作用域链的。 b、JavaScript没有块级作用域。 c、函数中声明的变量在整个函数中都有定义。 1、作用域链 观察alert(rain);这句代码。JavaScript首先在inner函数中查找是否定义了变量rain,如果定义了则使用inne ...
分类:
编程语言 时间:
2017-06-27 00:55:15
阅读次数:
190
1. 1 1,Alex Li,22,13651054608,IT,2013-04-01 2 2,Jack Wang,30,13304320533,HR,2015-05-03 3 3,Rain Liu,25,1383235322,Saies,2016-04-22 4 4,Mack Cao,40,135 ...
分类:
其他好文 时间:
2017-06-24 17:25:45
阅读次数:
366
题意: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rain ...
分类:
移动开发 时间:
2017-06-23 22:05:23
阅读次数:
215
题目: Given n x m non-negative integers representing an elevation map 2d where the area of each cell is 1 x 1, compute how much water it is able to trap ...
分类:
移动开发 时间:
2017-06-22 21:47:12
阅读次数:
276
P2212 [USACO14MAR]浇地Watering the Fields P2212 [USACO14MAR]浇地Watering the Fields P2212 [USACO14MAR]浇地Watering the Fields 题目描述 Due to a lack of rain, Fa ...
分类:
其他好文 时间:
2017-06-20 15:29:51
阅读次数:
219
题目链接: http://poj.org/problem?id=2826 题目描述: An Easy Problem?! Description It's raining outside. Farmer Johnson's bull Ben wants some rain to water his ...
分类:
其他好文 时间:
2017-06-18 10:30:38
阅读次数:
218