
算法
大熊1997
这个作者很懒,什么都没留下…
展开
-
1042 Gone Fishing(枚举+贪心)
思路:枚举湖的个数,然后贪心选择鱼最多的湖。 在枚举湖的个数时,先把湖之间“奔走”的时间单独算出来,用总的时间减去“奔走”的时间,就是纯粹钓鱼的时间。然后再算出总的钓鱼的次数,对每次钓鱼选择鱼最多的那个湖钓,这样算出来的就是钓的最多的鱼的方案。 注意一些细节: 1、题中要求的是当湖中鱼的个数相等时,就在湖的编号小的湖中钓。 2、当全部的湖中,鱼都钓完了,就在第一个湖中钓。原创 2013-05-18 12:47:00 · 644 阅读 · 0 评论 -
关于加密 解密 认证 证书 等概念
网络数据chuan第一步的难点就是加密解密,我选择使用OpenSSL. OpenSSL初接触的人恐怕最难的在于先理解各种概念 公钥/私钥/签名/验证签名/加密/解密/非对称加密 我们一般的加密是用一个密码加密文件,然后解密也用同样的密码.这很好理解,这个是对称加密.而有些加密时,加密用的一个密码,而解密用另外一组密码,这个叫非对称加密,意思就是加密解密的密码不翻译 2014-04-23 12:08:59 · 1244 阅读 · 0 评论 -
【LeetCode】Container With Most Water 解题报告
【题目】 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (原创 2016-07-15 11:21:14 · 278 阅读 · 0 评论 -
【LeetCode】ZigZag Conversion
【题目】 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H原创 2016-07-15 11:22:55 · 315 阅读 · 0 评论 -
从B 树、B+ 树、B* 树谈到R 树
从B 树、B+ 树、B* 树谈到R 树 作者:July、weedge、Frankie。编程艺术室出品。 说明:本文从B树开始谈起,然后论述B+树、B*树,最后谈到R 树。其中B树、B+树及B*树部分由weedge完成,R 树部分由Frankie完成,全文最终由July统稿修订完成。 出处:http://blog.youkuaiyun.com/v_JULY_v 。 第一节、B树、B+树、B*转载 2018-01-15 22:19:38 · 310 阅读 · 0 评论