题目大意: 有n个人 接下来一行n个数a[i] 表示第i个人描述其他人有a[i]个的帽子跟他不一样 帽子编号为1~n 如果所有的描述都是正确的 输出possible 再输出一行b[i] 表示第i个人的帽子的编号 如果存在矛盾 输出impossible 如果存在p 个人都描述有q个人跟他们的帽子不一样 ...
分类:
其他好文 时间:
2018-12-17 11:40:13
阅读次数:
243
0 引言 和其他数据库一样,优化IO也是HBase提升性能的不二法宝,而提供缓存更是优化的重中之重。 根据二八法则,80%的业务请求都集中在20%的热点数据上,因此将这部分数据缓存起就可以极大地提升系统性能。 HBase在实现中提供了两种缓存结构:MemStore和BlockCache。其中MemS ...
分类:
系统相关 时间:
2018-12-17 02:02:51
阅读次数:
271
使用 Karma + Mocha做单元测试 Karma([?kɑrm?] 卡玛)是一个测试运行器,它可以呼起浏览器,加载测试脚本,然后运行测试用例 Mocha([?mo?k?] 摩卡)是一个单元测试框架/库,它可以用来写测试用例 Sinon(西农)是一个 spy / stub / mock 库,用以 ...
分类:
其他好文 时间:
2018-12-17 02:02:44
阅读次数:
306
Your friend is typing his name into a keyboard. Sometimes, when typing a character c, the key might get long pressed, and the character will be typed ...
分类:
编程语言 时间:
2018-12-16 11:00:57
阅读次数:
200
# -*- coding: utf-8 -*- # @Time : 2018/12/15 18:55 # @File : coroutine.py #一个简单的 Coroutine 框架 import socket # on top of TCP import time from selectors... ...
分类:
编程语言 时间:
2018-12-15 21:10:11
阅读次数:
256
There are N boxes on the ground, which are labeled by numbers from 1 to N. The boxes are magical, the size of each one can be enlarged or reduced arbi ...
分类:
其他好文 时间:
2018-12-13 23:31:37
阅读次数:
196
A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents ...
分类:
编程语言 时间:
2018-12-12 19:02:37
阅读次数:
168
b: Suffix Zeroes Description 这个游戏超休闲的~。现在你需要找一个自然数n,你找的自然数需要满足n!的末尾恰好有k个0(当然我们都是十进制下的数,n! = 1*2*3*…*n)。比如:5!= 120,尾部恰好有一个0。 这个游戏超休闲的~。现在你需要找一个自然数n,你找的 ...
分类:
其他好文 时间:
2018-12-09 16:29:32
阅读次数:
217
jupyter 使用过程中的实用细节 Image control in Jupyter markdown is possible but the image needs to be preceded by "attachment" or it doesn't display. <img src="a ...
分类:
其他好文 时间:
2018-12-09 16:21:28
阅读次数:
115
参考:BIOS and UEFI - CompTIA A+ 220-901 - 1.1 BIOS and UEFI As Fast As Possible 严格上来说BIOS和UEFI除了在搜索bootable device时和磁盘有点关系,剩下就没有任何关系了。BIOS和UEFI时独立于OS的存在 ...
分类:
移动开发 时间:
2018-12-09 16:11:53
阅读次数:
216