http://acm.hdu.edu.cn/showproblem.php?pid=4585从原来的人中找出战斗数值最接近的,输出他们两人的序号要在logn的复杂度完成查找,我用的是set,当然用map也可以,两个内部都是红黑树实现水题一道#include #include #include #in...
分类:
其他好文 时间:
2014-07-16 19:21:25
阅读次数:
179
我们先看Hashtable。MSDN的解释:表示键/值对的集合,这些键/值对根据键的哈希代码进行组织。Hash算法是把任意长度的输入(又叫做预映射, pre-image),通过散列算法,变换成固定长度的输出,该输出就是散列值。这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不 同的...
分类:
其他好文 时间:
2014-07-16 19:14:46
阅读次数:
239
window.location属性描述hash设置或获取 href 属性中在井号“#”后面的分段。host设置或获取 location 或 URL 的 hostname 和 port 号码。hostname设置或获取 location 或 URL 的主机名称部分。href设置或获取整个 URL 为字...
分类:
Web程序 时间:
2014-07-16 19:12:42
阅读次数:
255
微信开发中,很多商家用户都要求点具体地址,能在百度或者soso地图上面显示自己的地址。
而这样的功能,利用百度api接口地图标点功能就可以很简单实现。功能说明如下:
地图标点功能
调用该接口可调起PC或web地图,且在指定坐标点上显示点的名称和内容信息。
示例
http://api.map.baidu.com/marker?loca...
分类:
微信 时间:
2014-07-15 10:30:10
阅读次数:
513
A - DZY Loves Hash水题,开辟一个数组即可#include #include #include #include using namespace std;int main(){ int p,n; cin >> p >> n; vector buckets(302,f...
分类:
其他好文 时间:
2014-07-14 19:46:01
阅读次数:
307
require 'multi_json'MultiJson.load('{"abc":"def"}') #=> {"abc" => "def"}MultiJson.load('{"abc":"def"}', :symbolize_keys => true) #=> {:abc => "def"}Mu...
分类:
Web程序 时间:
2014-07-14 19:05:34
阅读次数:
246
import java.util.HashMap;
import java.util.Map;
/**
* 创建日期: 2014-04-18 10:36:25
* 作者: 黄飞
* mail:huangfei8087@163.com 834865081@qq.com
* ©版权归作者所有
* */
public class ConverFromGBKToUTF8 {
public st...
分类:
编程语言 时间:
2014-07-14 18:15:14
阅读次数:
345
A. DZY Loves Hash
水题!!
AC代码如下:
#include
#include
#include
#include
#include
#define inf 100000000
#define M 100005
#define ll long long
#define F(a,b) for(i=a;i<=b;i++)
#define ME(a) memse...
分类:
其他好文 时间:
2014-07-14 17:30:29
阅读次数:
267
题目来源,待字闺中,原创@陈利人
,欢迎大家继续关注微信公众账号“待字闺中”
给一个整数数组a[],
找到其中包含最多连续数的子集,比如给:15, 7, 12, 6, 14, 13, 9, 11,则返回: 5:[11, 12, 13, 14, 15] 。
分析:最简单的方法是sort然后scan一遍,但是要
o(nlgn) , 有什么 O(n) 的方法吗?网上有人用map或set来...
分类:
其他好文 时间:
2014-07-14 16:47:17
阅读次数:
226
http://pan.baidu.com/s/1mg1EYAOwindows各种版本map.centerAndZoom(point,15);这句话可以指向地图的不同位置百度云http://developer.baidu.com/map/jsdemo.htm#i1_1?qq-pf-to=pcqq.c2c1百度云粉丝http://yun.baidu.com/share/home?uk=1814500964&view=share#category/type..
分类:
数据库 时间:
2014-07-14 16:41:20
阅读次数:
364