1078. Hashing (25)
时间限制
100 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
The task of this problem is simple: insert a seq...
分类:
其他好文 时间:
2014-08-11 00:24:21
阅读次数:
206
解题报告
题意:
求逆序数。
思路:
线段树离散化处理。
#include
#include
#include
#include
#define LL long long
using namespace std;
LL sum[2001000],num[501000],_hash[501000];
void push_up(int rt)
{
sum[rt]=sum[rt...
分类:
其他好文 时间:
2014-08-11 00:22:01
阅读次数:
255
poj1200:http://poj.org/problem?id=1200题意:给你一个有m种字符串,求长度为n的连续子串由多少种。题解:网上的代码都是hash,但是本人觉得hash有问题,就是n,m稍微大点,hash的值都会爆出int,无法开数组来记录该串是否被记录。可能数据弱,结果hash竟然...
分类:
其他好文 时间:
2014-08-10 23:58:00
阅读次数:
559
hdu1880:http://acm.hdu.edu.cn/showproblem.php?pid=1880题意:中文题,直接看题。题解:第一法用hash做的的题目。虽然用了很长时间,但是还是AC了。而且用了string 所以有点慢。 1 #include 2 #include 3 #include...
分类:
其他好文 时间:
2014-08-10 23:49:40
阅读次数:
300
首先该DEMO在StreamCoder上面做的改动,期间导致StreamCoderDEMO经常出现问题,导致大家运行的时候,频频出现问题,表示道歉。以下是测试的结果,从服务器下载传输了一个3G左右的文件(Win7.iso)。传输后用Hash工具做了个测试,是一样的。后面贴出了两个文件的贴图。下面是客...
分类:
其他好文 时间:
2014-08-10 21:29:10
阅读次数:
281
#include #include #include #include #include #include using namespace std;struct node{ int m,n; // bool f;};node hash[200];char s[1000];int main(...
分类:
其他好文 时间:
2014-08-10 21:10:11
阅读次数:
345
STL hash table, Unordered Contain C++11加入使用hash table实现的Unordered Containers。容器中元素是不排序的,同时我们也不能指定某个元素的位置。 头文件:#include unordered_set; unordered_multis...
分类:
其他好文 时间:
2014-08-10 21:07:20
阅读次数:
294
这里会涉及两个需求,有时候,我们想将获得的url字符串按键值对的形式保存成一个对象,用location.search获得url参数字符串,这里不考虑location.pathname和location.hash。url字符串对象化 1 var urlToObj = function (){ 2 .....
分类:
其他好文 时间:
2014-08-10 18:03:40
阅读次数:
139
http://poj.org/problem?id=2774
想用后缀数组的看这里:http://blog.csdn.net/u011026968/article/details/22801015
本文主要讲下怎么hash去找
开始的时候写的是O(n^2 logn)算法 果断超时。。。虽然也用了二分的,,
代码如下:
//hash+二分
#include
#include
#incl...
分类:
其他好文 时间:
2014-08-10 01:47:49
阅读次数:
337