链接越来越感觉到了数学的重要性!。。这题本来用以斜率和长度为key值进行hash不过感觉很麻烦还TLE了。。最后知道中点一样的话就可以组成平行四边形,初中数学就可以了。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #inclu....
分类:
其他好文 时间:
2014-07-22 22:52:13
阅读次数:
291
一、Memcached是何方神圣? 在数据驱动的Web开发中,经常要重复从数据库中取出相同的数据,这种重复极大的增加了数据库负载。缓存是解决这个问题的好办法。但是ASP.NET中的HttpRuntime.Cache虽然已经可以实现对页面局部进行缓存,但还是不够灵活,此时Memcached或许是你想....
分类:
其他好文 时间:
2014-07-20 08:32:47
阅读次数:
242
Dictionaries have a method called items that returns a list of tuples, where each tuple is a key-value pair. As you should expect from a dictionary, t...
分类:
其他好文 时间:
2014-07-19 23:02:40
阅读次数:
372
getProperty(String key, String def)
分类:
其他好文 时间:
2014-07-19 22:22:31
阅读次数:
182
javascript对象有:1.对象,object;2.日期,Date;3.数组.Array;4.正则表达式,Regex5.函数 function对象的定义:如: var book={} 定义一个空对象;var book2={key:value}; hashMapvar book3={"name":...
分类:
编程语言 时间:
2014-07-19 18:36:16
阅读次数:
195
import hashlib;from Crypto.Cipher import DES3import base64def create_key(sk): r=hashlib.md5(sk).digest() return r+r[:8]def init_str(s): l=len(s) % 16 ...
分类:
编程语言 时间:
2014-07-19 16:07:32
阅读次数:
192
INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;INSERT 中 ON DUPLICATE KEY UPDATE的使用如果指定了ON DUPLICATE KEY UPDATE,并且插入行后会导致在一个UN....
分类:
数据库 时间:
2014-07-19 14:13:42
阅读次数:
261
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他好文 时间:
2014-07-19 12:13:13
阅读次数:
254
不同版本的Visual Studio 2013软件Visual Studio Ultimate 2013 KEY:BWG7X-J98B3-W34RT-33B3R-JVYW9Visual Studio Premium 2013 KEY:FBJVC-3CMTX-D8DVP-RTQCT-92494Visu...
分类:
其他好文 时间:
2014-07-19 11:22:32
阅读次数:
217