码迷,mamicode.com
首页 >  
搜索关键字:hash map    ( 36038个结果)
poj 3156 hash+记忆化搜索 期望dp
#include#include#include#includeusing namespace std;int n,m;#define N 32#define mod 10007LL#define mod2 10000007#define inf 0x3ffffffftypedef long lon...
分类:其他好文   时间:2014-07-09 21:48:32    阅读次数:358
JavaScript创建Map对象(转)
JavaScript 里面本身没有map对象,用JavaScript的Array来实现Map的数据结构。Js代码/**MAP对象,实现MAP功能**接口:*size()获取MAP元素个数*isEmpty()判断MAP是否为空*clear()删除MAP所有元素*put(key,value)向MAP中增...
分类:编程语言   时间:2014-07-09 20:44:38    阅读次数:213
JavaScript SHA-1
1. [文件] webtoolkit.sha1.js ~ 4KB /**** Secure Hash Algorithm (SHA1)* http://www.huiyi8.com/css3/***/function SHA1 (msg) {function rotate_left(n,s) {v....
分类:编程语言   时间:2014-07-09 00:46:00    阅读次数:343
JavaScript Map对象的实现
1. [代码]js代码 /** MAP对象,实现MAP功能** 接口:* size() 获取MAP元素个数* isEmpty() 判断MAP是否为空* clear() 删除MAP所有元素* put(key, value) 向MAP中增加元素(key, value)* remove(ke...
分类:编程语言   时间:2014-07-09 00:27:03    阅读次数:300
poj2239 Selecting Courses --- 二分图最大匹配
匈牙利算法模板题有n门课程,每门课程可能有不同一时候间,不同一时候间的课程等价。问不冲突的情况下最多能选多少门课。建立二分图,一边顶点表示不同课程,还有一边表示课程的时间(hash一下)。#include #include #include #include #include #include #i...
分类:其他好文   时间:2014-07-08 23:05:36    阅读次数:291
DECLARE_MESSAGE_MAP用法
DECLARE_MESSAGE_MAP( )  说明:  你的程序中的每一个CCmdTarget的派生类都可以提供一个消息映射以处理消息。在你的类声明的末尾使用DECLARE_MESSAGE_MAP宏。然后,在实现了类成员函数的.CPP文件中加入BEGIN_MESSAGE_MAP宏,再加入每个消息处理函数的宏入口,最后使用END_MESSAGE_MAP宏。  注意:  如果你在DE...
分类:其他好文   时间:2014-07-08 16:03:43    阅读次数:146
HDU 1075 What Are You Talking About
字典树 看题库上说这是字典树,不过被我水过去了。 题意是说用对应的字典,翻译出火星文。 each line will contain at most 3000 characters. 看到这句话我就安心了。Time Limit: 10000/5000 MS (Java/Others) 果断用map 来水了。还真AC了。3296MS 。本来是想巩固一下字典树的,不过……。 ...
分类:其他好文   时间:2014-07-08 14:42:44    阅读次数:173
HDU 1251 统计难题
字典树问题。 其实也可以用map水过去。但是想到我还要巩固…… 唉,还是老老实实用字典树。不过 输入中间的 空行 卡了我一下,RE…… 果断判断*str AC了。 #include #include #include #include #include #include #include #include #include #include #include #include #d...
分类:其他好文   时间:2014-07-08 14:14:00    阅读次数:203
hash_set 在g++下编译出现not declare的问题
今天在Ubuntu下写一个程序的时候用到了hash_set容器,出现一点问题,在这里记录一下,先说一下,hash_*系列例如hash_map,hash_set 等已经被废弃了,C++11用unordered_map,unordered_set等来替代,但是我用的g++ 4.6.1警告说C++11特性是实验性的,貌似到4.8才完全支持。所以就改用hash_set了,写了如下的程序: #includ...
分类:其他好文   时间:2014-07-06 12:47:24    阅读次数:209
UVA 10004 Bicoloring
题目如下: Bicoloring  In 1976 the ``Four Color Map Theorem" was proven with the assistance of acomputer. This theorem states that every map can be colored using only fourcolors, in...
分类:其他好文   时间:2014-07-06 12:28:07    阅读次数:241
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!