http://acm.hdu.edu.cn/showproblem.php?pid=5558 对于每个后缀suffix(i),想要在前面i - 1个suffix中找到一个pos,使得LCP最大。这样做O(n^2) 考虑到对于每一个suffix(i),最长的LCP肯定在和他排名相近的地方取得。 按排名 ...
分类:
编程语言 时间:
2017-08-07 00:12:28
阅读次数:
179
itemgetter函数:对字典列表进行多键排序 运行结果: ...
分类:
编程语言 时间:
2017-08-05 22:48:45
阅读次数:
612
3004: 吊灯 Time Limit: 10 Sec Memory Limit: 128 MB Submit: 52 Solved: 32 [Submit][Status][Discuss] Description Alice家里有一盏非常大的吊灯。所谓吊灯,就是由非常多个灯泡组成。仅仅有一个灯泡 ...
分类:
其他好文 时间:
2017-08-05 16:47:50
阅读次数:
139
Alice thinks an integer x is a K-wolf number, if every K adjacent digits in decimal representation of x is pairwised different. Given (L,R,K), please ...
分类:
其他好文 时间:
2017-08-04 13:57:04
阅读次数:
177
总结:公钥和私钥是成对的,它们互相解密。 公钥加密,私钥解密。 私钥数字签名,公钥验证。 举例 比如有两个用户Alice和Bob,Alice想把一段明文通过双钥加密的技术发送给Bob,Bob有一对公钥和私钥,那么加密解密的过程如下: 上面的过程可以用下图表示,Alice使用Bob的公钥进行加密,Bo ...
分类:
其他好文 时间:
2017-08-04 12:40:39
阅读次数:
117
Alice and Bob play 5-in-a-row game. They have a playing field of size 10?×?10. In turns they put either crosses or noughts, one at a time. Alice puts ...
分类:
其他好文 时间:
2017-08-02 10:16:25
阅读次数:
134
Regressor 回归 作者: Alice 编辑: Morvan 神经网络可以用来模拟回归问题 (regression),例如给下面一组数据,用一条线来对数据进行拟合,并可以预测新输入 x 的输出值。 用 Keras 构建回归神经网络的步骤: 导入模块并创建数据 models.Sequential ...
分类:
其他好文 时间:
2017-08-01 12:36:43
阅读次数:
401
字典:当索引不好用时 字典是python中唯一内建的map类型 创建: key可以是内置类型,或者元组 通过大括号好: phonebook{'alice': '2341', 'beth':'9102'} 通过dict函数 键值对列表做参数 >>> items=[("name", "Gumby"), ...
分类:
其他好文 时间:
2017-07-31 23:27:56
阅读次数:
199
You are fishing with polar bears Alice and Bob. While waiting for the fish to bite, the polar bears get bored. They come up with a game. First Alice a ...
分类:
其他好文 时间:
2017-07-30 23:56:12
阅读次数:
398
Cipher 时限:1000MS Description Bob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but their enc ...
分类:
其他好文 时间:
2017-07-26 22:11:36
阅读次数:
155