10 2016 档案

摘要:二分查找简介 二分查找是一种在有序数组中查找某一特定元素的搜索算法。搜索过程从数组的中间元素开始,如果中间元素正好是要查找的元素,则搜索过程结束;如果某一特定元素大于或者小于中间元素,则在数组大于或小于中间元素的那一半中查找,而且跟开始一样从中间元素开始比较。如果在某一步骤数组为空,则代表找不到... 阅读全文
posted @ 2016-10-30 23:11 N3verL4nd 阅读(131) 评论(0) 推荐(0) 编辑
摘要:二分查找简介 二分查找是一种在有序数组中查找某一特定元素的搜索算法。搜索过程从数组的中间元素开始,如果中间元素正好是要查找的元素,则搜索过程结束;如果某一特定元素大于或者小于中间元素,则在数组大于或小于中间元素的那一半中查找,而且跟开始一样从中间元素开始比较。如果在某一步骤数组为空,则代表找不到... 阅读全文
posted @ 2016-10-30 23:11 N3verL4nd 阅读(134) 评论(0) 推荐(0) 编辑
摘要:Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in th... 阅读全文
posted @ 2016-10-30 22:48 N3verL4nd 阅读(108) 评论(0) 推荐(0) 编辑
摘要:md5.h #ifndef MD5_H#define MD5_Htypedef struct{ unsigned int count[2];/* 位数量, 模 2^64 (低位在前) */ unsigned int state[4];/* state (ABCD) */ unsigned cha... 阅读全文
posted @ 2016-10-30 21:48 N3verL4nd 阅读(140) 评论(0) 推荐(0) 编辑
摘要:md5.h #ifndef MD5_H#define MD5_Htypedef struct{ unsigned int count[2];/* 位数量, 模 2^64 (低位在前) */ unsigned int state[4];/* state (ABCD) */ unsigned cha... 阅读全文
posted @ 2016-10-30 21:48 N3verL4nd 阅读(185) 评论(0) 推荐(0) 编辑
摘要:You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can yo... 阅读全文
posted @ 2016-10-27 23:04 N3verL4nd 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The func... 阅读全文
posted @ 2016-10-26 23:41 N3verL4nd 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The func... 阅读全文
posted @ 2016-10-26 23:41 N3verL4nd 阅读(109) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1]... 阅读全文
posted @ 2016-10-25 18:29 N3verL4nd 阅读(171) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime c... 阅读全文
posted @ 2016-10-25 14:40 N3verL4nd 阅读(122) 评论(0) 推荐(0) 编辑
摘要:344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". clas... 阅读全文
posted @ 2016-10-25 09:52 N3verL4nd 阅读(123) 评论(0) 推荐(0) 编辑
摘要:344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". clas... 阅读全文
posted @ 2016-10-25 09:52 N3verL4nd 阅读(156) 评论(0) 推荐(0) 编辑
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation an... 阅读全文
posted @ 2016-10-25 09:47 N3verL4nd 阅读(169) 评论(0) 推荐(0) 编辑
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation an... 阅读全文
posted @ 2016-10-25 09:47 N3verL4nd 阅读(107) 评论(0) 推荐(0) 编辑
摘要:https://leetcode.com/problems/battleships-in-a-board/ Given an 2D board, count how many different battleships are in it. The battleships are repr... 阅读全文
posted @ 2016-10-24 23:40 N3verL4nd 阅读(139) 评论(0) 推荐(0) 编辑
摘要:https://leetcode.com/problems/battleships-in-a-board/ Given an 2D board, count how many different battleships are in it. The battleships are repr... 阅读全文
posted @ 2016-10-24 23:40 N3verL4nd 阅读(136) 评论(0) 推荐(0) 编辑
摘要:https://msdn.microsoft.com/en-us/library/windows/desktop/ms533826(v=vs.85).aspx The purpose of hit testing is to determine whether the cursor is... 阅读全文
posted @ 2016-10-24 12:20 N3verL4nd 阅读(265) 评论(0) 推荐(0) 编辑
摘要:https://msdn.microsoft.com/en-us/library/windows/desktop/ms533826(v=vs.85).aspx The purpose of hit testing is to determine whether the cursor is... 阅读全文
posted @ 2016-10-24 12:20 N3verL4nd 阅读(412) 评论(0) 推荐(0) 编辑
摘要:1、继承自CDoubleBufferImpl template class CDoubleBufferImpl{public:// Overrideables void DoPaint(CDCHandle /*dc*/) { // must be implemented in a derive... 阅读全文
posted @ 2016-10-17 19:55 N3verL4nd 阅读(233) 评论(0) 推荐(0) 编辑
摘要:1、继承自CDoubleBufferImpl template class CDoubleBufferImpl{public:// Overrideables void DoPaint(CDCHandle /*dc*/) { // must be implemented in a derive... 阅读全文
posted @ 2016-10-17 19:55 N3verL4nd 阅读(165) 评论(0) 推荐(0) 编辑
摘要:RECT rect; //获得客户区坐标 GetClientRect(&rect); //Graphics作图对象 Graphics g(m_hWnd); 画线: Pen pen(Color(255, 0, 0, 0)); g.DrawLine(&pen, rect.left, re... 阅读全文
posted @ 2016-10-17 16:04 N3verL4nd 阅读(107) 评论(0) 推荐(0) 编辑
摘要:基于VS2013+WTL9.1实现 // MoveableWindowView.h : interface of the CMoveableWindowView class/////////////////////////////////////////////////////////////... 阅读全文
posted @ 2016-10-16 20:06 N3verL4nd 阅读(169) 评论(0) 推荐(0) 编辑
摘要:基于VS2013+WTL9.1实现 // MoveableWindowView.h : interface of the CMoveableWindowView class/////////////////////////////////////////////////////////////... 阅读全文
posted @ 2016-10-16 20:06 N3verL4nd 阅读(176) 评论(0) 推荐(0) 编辑
摘要:双缓冲的原理可以这样形象的理解:把电脑屏幕看作一块黑板。首先我们在内存环境中建立一个“虚拟“的黑板,然后在这块黑板上绘制复杂的图形,等图形全部绘制完毕的时候,再一次性的把内存中绘制好的图形“拷贝”到另一块黑板(屏幕)上。采取这种方法可以提高绘图速度,极大的改善绘图效果。 例如在OnDraw... 阅读全文
posted @ 2016-10-15 19:55 N3verL4nd 阅读(262) 评论(0) 推荐(0) 编辑
摘要:主要是懒得每次上网都需要打开网页=。= logon.bat @echo offmode con: cols=40 lines=15color 0atitle 登录ing...rem 获得IPwget "https://lgn6.bjut.edu.cn/V6?https://lgn.bjut.... 阅读全文
posted @ 2016-10-07 23:46 N3verL4nd 阅读(648) 评论(0) 推荐(0) 编辑
摘要:主要是懒得每次上网都需要打开网页=。= logon.bat @echo offmode con: cols=40 lines=15color 0atitle 登录ing...rem 获得IPwget "https://lgn6.bjut.edu.cn/V6?https://lgn.bjut.... 阅读全文
posted @ 2016-10-07 23:46 N3verL4nd 阅读(3632) 评论(0) 推荐(0) 编辑
摘要:RationQueue.h #pragma onceclass RationQueue{public: RationQueue(); ~RationQueue();public: bool push(double d); //入栈 bool pop(double &data); //出栈 b... 阅读全文
posted @ 2016-10-06 23:06 N3verL4nd 阅读(131) 评论(0) 推荐(0) 编辑
摘要:结构体(struct)/联合体(union)里的数据成员:第一个数据成员放在offset为0的地方,以后每个数据成员存储的起始位置要从该成员大小的整数倍开始。 结构体作为成员:如果一个结构里有某些结构体成员,则结构体成员要从其内部最大元素大小的整数倍地址开始存储。 结构体的总大小对齐:也就是s... 阅读全文
posted @ 2016-10-01 20:36 N3verL4nd 阅读(142) 评论(0) 推荐(0) 编辑
摘要:结构体(struct)/联合体(union)里的数据成员:第一个数据成员放在offset为0的地方,以后每个数据成员存储的起始位置要从该成员大小的整数倍开始。 结构体作为成员:如果一个结构里有某些结构体成员,则结构体成员要从其内部最大元素大小的整数倍地址开始存储。 结构体的总大小对齐:也就是s... 阅读全文
posted @ 2016-10-01 20:36 N3verL4nd 阅读(136) 评论(0) 推荐(0) 编辑
摘要:标准的Windows应用程序框架: /*------------------------------------------------------------ HELLOWIN.C -- Displays "Hello, Windows 98!" in client area ... 阅读全文
posted @ 2016-10-01 13:47 N3verL4nd 阅读(194) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示