自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

晚晴小筑

向青草更青处漫溯

  • 博客(19)
  • 资源 (61)
  • 收藏
  • 关注

原创 你真的会二分查找吗?

最简单的二分查找算法:即找到返回下标,找不到返回-1,(坐标范围:0~nums.size() - 1)#include #include #include #include #include #include #include #include using namespace std;int BinarySearch(vector& nums, int target)

2016-10-30 23:11:29 561

原创 34. Search for a Range

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 the order of O(log n).If the target is not found

2016-10-30 22:48:37 494 1

原创 MD5算法实现

md5.h#ifndef MD5_H#define MD5_Htypedef struct{ unsigned int count[2];/* 位数量, 模 2^64 (低位在前) */ unsigned int state[4];/* state (ABCD) */ unsigned char buffer[64];/* 输入缓冲器 */}MD5_CTX;//非线性辅助函

2016-10-30 21:48:57 572

原创 70. Climbing Stairs QuestionEditorial Solution

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 you climb to the top?DFS#include #incl

2016-10-27 23:04:38 396

原创 167. Two Sum II - Input array is sorted

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 function twoSum should return indices of the two number

2016-10-26 23:41:48 519

原创 303. Range Sum Query - Immutable

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]sumRange(0, 2) -> 1sumRange(2, 5) -> -1sumRan

2016-10-25 18:29:33 398

原创 136. Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using e

2016-10-25 14:40:22 385

原创 leetcode水题题解

344. Reverse StringWrite a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".class Solution {public: string reverseString(stri

2016-10-25 09:52:04 535

原创 338. Counting Bits

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 and return them as an array.Example:For num = 5

2016-10-25 09:47:19 478

原创 419. Battleships in a Board

Given an 2D board, count how many different battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules:You receiv

2016-10-24 23:40:48 1168

原创 GDI+如何判断一个点是否在区域内

https://msdn.microsoft.com/en-us/library/windows/desktop/ms533826(v=vs.85).aspxThe purpose of hit testing is to determine whether the cursor is over a given object, such as an icon or a butt

2016-10-24 12:20:10 2387

原创 WTL使用双缓冲避免重绘闪烁

1、继承自CDoubleBufferImpltemplate class CDoubleBufferImpl{public:// Overrideables void DoPaint(CDCHandle /*dc*/) { // must be implemented in a derived class ATLASSERT(FALSE); }// Message m

2016-10-17 19:55:45 931

原创 gdi+学习笔记

RECT rect; //获得客户区坐标 GetClientRect(&rect); //Graphics作图对象 Graphics g(m_hWnd);画线:Pen pen(Color(255, 0, 0, 0)); g.DrawLine(&pen, rect.left, rect.top, rect.right, rect.bottom); g.DrawLi

2016-10-17 16:04:19 457

原创 可移动窗口

基于VS2013+WTL9.1实现// MoveableWindowView.h : interface of the CMoveableWindowView class///////////////////////////////////////////////////////////////////////////////#pragma once#include "MyWindo

2016-10-16 20:06:04 664

转载 C++零食:WTL中使用双缓冲避免闪烁

在自己画的窗口中,有时候会有闪烁现象。为什么会有闪烁现象呢?其实是因为程序在画窗口时需要用背景色清空显示区域,然后再画。由于这两者的反差比较大,就会被人眼睛捕捉到,感觉闪烁。双缓冲就是先在内存中把图画好,然后直接复制到屏幕上去,这样的反差就比较小,也就不觉得闪烁了。   WTL中的CDoubleBufferImplWTL中有现成的双缓冲类实现

2016-10-15 19:55:00 1173

原创 Drcom校园网自动登录

主要是懒得每次上网都需要打开网页=。=logon.bat@echo offmode con: cols=40 lines=15color 0atitle 登录ing...rem 获得IPwget "https://lgn6.bjut.edu.cn/V6?https://lgn.bjut.edu.cn" --post-data="DDDDD=学号&upass=密码&v46s=0&

2016-10-07 23:46:26 20431

原创 链式队列

RationQueue.h#pragma onceclass RationQueue{public: RationQueue(); ~RationQueue();public: bool push(double d); //入栈 bool pop(double &data); //出栈 bool empty(); //判断栈是否为空private: typed

2016-10-06 23:06:40 351

原创 内存对齐规则

结构体(struct)/联合体(union)里的数据成员:第一个数据成员放在offset为0的地方,以后每个数据成员存储的起始位置要从该成员大小的整数倍开始。结构体作为成员:如果一个结构里有某些结构体成员,则结构体成员要从其内部最大元素大小的整数倍地址开始存储。结构体的总大小对齐:也就是sizeof的结果,必须是其内部最大成员的整数倍,不足的要补齐。VS2013 + W

2016-10-01 20:36:56 481

原创 ATL窗口

标准的Windows应用程序框架:/*------------------------------------------------------------ HELLOWIN.C -- Displays "Hello, Windows 98!" in client area (c) Charles Petzold, 1998 -----------

2016-10-01 13:47:15 441

医院信息科考试题医院信息科考试题

医院信息科考试题

2022-06-24

阿里巴巴编码规范试题答案

阿里巴巴编码规范试题答案

2022-05-05

lua-cjson-2.1.0-已编译

LUA-cjson已经编译 LUA-cjson已经编译 LUA-cjson已经编译 LUA-cjson已经编译 LUA-cjson已经编译 LUA-cjson已经编译

2018-04-16

mybatis plugin 3.21

将压缩包里的 MyBatis plugin 文件夹解压到 .IntelliJIdea\config\plugins 目录即可使用

2017-12-26

mybatis plugin 3.21破解补丁

mybatis plugin 3.21破解补丁 mybatis plugin 3.21破解补丁 mybatis plugin 3.21破解补丁

2017-11-13

QQWry-源码

QQWry源码,包括:ipsearcher、ipwry以及转换器。 QQWry源码,包括:ipsearcher、ipwry以及转换器。 QQWry源码,包括:ipsearcher、ipwry以及转换器。

2017-11-13

MyBatis3学习资料

目前来看最优秀的MyBatis3学习资料,没有之一。 目前来看最优秀的MyBatis3学习资料,没有之一。

2017-10-19

Privacy in Location-Based Applications

Privacy in Location-Based Applications书籍 Privacy in Location-Based Applications书籍

2017-10-17

Eclipse开发环境配置

Eclipse开发环境配置Eclipse开发环境配置Eclipse开发环境配置Eclipse开发环境配置

2017-09-29

Differential Privacy

微软的C. Dwork提出了一个概念,叫做Differential Privacy(差分隐私技术) `

2017-09-14

MySQL必知必会

MySQL必知必会清晰版 MySQL必知必会清晰版 MySQL必知必会清晰版 MySQL必知必会清晰版 MySQL必知必会清晰版 MySQL必知必会清晰版

2017-09-05

BJUT数字图像处理作业

本论文的编写围绕四个项目:图像空域/时域变换、图像增强、染色体计数与提取Mnist链码组成。项目的编写基于Windows 7 操作系统,使用VS2013作为开发环境,以OpenCV作为内部核心处理算法库。

2017-01-10

MoveableWindow

MoveableWindow

2016-10-16

Android逆向助手_v2.2

Android逆向助手_v2.2

2016-07-27

Android APK 反编译工具

Android APK 反编译工具

2016-07-27

北工大考研数据结构

北工大考研数据结构

2016-07-27

windows高级程序设计课件

windows高级程序设计课件 杨力祥

2016-07-27

凯立德2015版配置修改工具

凯立德2015版配置修改工具

2016-07-27

Lua程序设计(第二版)

Lua程序设计(第二版)

2016-07-27

反汇编深入分析函数调用

反汇编深入分析函数调用

2016-07-27

QQ截图工具

QQ截图工具

2016-07-22

QQ截图插件合集

QQ邮箱截图插件 微信截图插件 百度截图插件 搜狗截图插件

2016-07-21

【干货】国外程序员整理的_C++_资源大全

【干货】国外程序员整理的_C++_资源大全

2016-01-04

基于Android系统电子词典的设计与开发

基于Android系统电子词典的设计与开发

2015-09-19

c++实现查询天气预报

c++实现查询天气预报,简单实现!

2013-11-21

voice yeapp player2003

voice yeapp player2003

2013-11-17

ipwry源码 qqwry的升级版

ipwry源码 qqwry的升级版

2013-11-17

ipwry cnss出品

ipwry cnss出品

2013-11-17

ipwryQQwry的升级版

ipwryQQwry的升级版

2013-11-17

堆栈平衡(简单main函数演示)

堆栈平衡(简单main函数演示)

2013-10-29

堆栈平衡ppt

讲解堆栈平衡很不错的一个ppt,通俗易懂

2013-10-28

C++书写规范

C++书写规范

2013-09-03

运筹学teachdp动态规划

运筹学teachdp动态规划

2013-05-31

差分约束系统

差分约束系统

2013-05-22

浅析字母树在信息学竞赛中的应用

浅析字母树在信息学竞赛中的应用

2013-05-22

迷宫问题实现

迷宫问题实现

2013-05-03

广度优先搜索

广度优先搜索

2013-04-27

深度优先搜索

深度优先搜索

2013-04-27

ACM搜索算法

ACM搜索算法

2013-04-21

C ++中的map容器

C ++中的map容器

2013-04-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除