bfs+状态压缩。水题。
一开始我很挫的用了 vis[21][21][2][2][2][2][2][2][2][2][2][2]; G++,300+ms;
然后后来想到可以用二进制啊。笨。就改成了 vis[21][21][1024] G++,78ms;
#include
#include
#include
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2014-10-22 10:09:20
阅读次数:
219
Grand Central Dispatch (GCD)是Apple开发的一个多核编程的解决方法。 dispatch queue分成以下三种: 1)运行在主线程的Main queue,通过dispatch_get_main_queue获取。Java代码 /*!*@functiondispatch_g...
分类:
移动开发 时间:
2014-10-22 09:56:46
阅读次数:
158
problem:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not...
分类:
其他好文 时间:
2014-10-22 06:18:10
阅读次数:
149
上篇中我们实现了Work Queue的创建,在Work Queue背后,其实是rabbitMQ把每条任务消息只发给一个消费者。本篇中我们将要研究如何把一条消息推送给多个消费者,这种模式被称为publish/subscribe(发布/订阅)。为了说明这个模式,我们将会构建一个简单的日志系统。这将会包含...
分类:
其他好文 时间:
2014-10-21 19:20:39
阅读次数:
317
bfs+状态压缩。
一开始我很挫的用了 vis[21][21][2][2][2][2][2][2][2][2][2][2]; G++,300+ms;
然后后来想到可以用二进制啊。笨。就改成了 vis[21][21][1024] G++,78ms;
#include
#include
#include
#include
#include
#include
#include
...
分类:
其他好文 时间:
2014-10-21 17:49:45
阅读次数:
230
STL的容器可以分为以下几个大类:
一:序列容器, 有vector, list, deque, string.
二 : 关联容器, 有set, multiset, map, mulmap, hash_set, hash_map, hash_multiset, hash_multimap
三: 其他的杂项: stack, queue, valarray, bitset
...
分类:
其他好文 时间:
2014-10-21 13:50:51
阅读次数:
307
前些天客户的ogg延迟到达8小时左右,于是我当时用logdump追踪了一下:
看进程状态:
send extsa staus
EXTRACT ZBDBA (PID 2269368)
Current status: Recovery complete: Processing data with empty data queue
Current read positio...
分类:
其他好文 时间:
2014-10-21 12:21:05
阅读次数:
250
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below ...
分类:
其他好文 时间:
2014-10-21 02:13:40
阅读次数:
211
Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.就是判断haystack中是否有needle,如果包...
分类:
其他好文 时间:
2014-10-21 00:54:00
阅读次数:
151
直接上代码示例1:@interface TBViewController()//队列@property(nonatomic,strong)NSOperationQueue *queue;@end//队列的暂停和继续(在storyboard中拖两个按钮,分别为暂停、继续,连线)//暂停-(IBActi...
分类:
移动开发 时间:
2014-10-21 00:48:51
阅读次数:
229