内存屏障初探
原文地址
前言:多核时代的挑战
尽管80核心的浮点运算巨兽仍然遥不可及,多核处理器的时代已经到来。多核处理器的概念并非新鲜事物,在Power Macintosh 9500中就已经采用了多核处理器技术 …
more ...尽管80核心的浮点运算巨兽仍然遥不可及,多核处理器的时代已经到来。多核处理器的概念并非新鲜事物,在Power Macintosh 9500中就已经采用了多核处理器技术 …
more ...Trun x => X
or X => x
to make the number of 'x' is equal to the number of 'X'.
n = int(raw_input())
hamsters = [c for c in raw_input()]
sits = hamsters.count('x')
stands = hamsters.count('X')
if sits == stands:
print 0
print ''.join(hamsters)
else:
if sits > stands …
It has been months that I didn't participate in the contest on CF, now I'm back. :)
This round of contest makes me confused that the problem B and C is a little bit too twisted, if you can't catch the vital point, you will get a lot of WAs …
more ...For most time, we use malloc
or new
for memory allocation, which will get it on heap.
However, access memory on heap is not as effective as the memory on stack, because the heap is "free-floating region of memory". To the contrary, memory on stack is managed by CPU …
more ...Geohash is a latitude/longitude geocode system invented by Gustavo Niemeyer when writing the web service at geohash.org, and put into the public domain. It is a hierarchical spatial data structure which subdivides space into buckets of grid shape.
简单说,GeoHash是一个将经纬度信息编码成一个string的算法。从而便于储 …
more ...Pelican内置python-markdown做为默认解析器,用来将用户的Markdown
格式的文章转为网页格式展示。
然而,python-markdown
模块的解析逻辑有严重的Bug。例如一个 …
交错路:设P是图G的一条路,如果P的任意两条相邻的边一定是一条属于M而另一条不属于M,就称P是一条交错路。
通俗点来说,就是把一个图中的路径染成红黑两种。然后找出一条路,使这条路红黑 …
more ...