原文地址http://blog.csdn.net/crazy_frog/article/details/8664108/// 添加所有的手势- (void) addGestureRecognizerToView:(UIView *)view{ // 旋转手势 UIRotationGest...
分类:
移动开发 时间:
2014-09-29 15:52:01
阅读次数:
163
题目链接
题意:n个人坐成环形,相邻的两个可以交换位置,求最少交换次数使得序列相反。
思路:类似与冒泡排序,可以将环形序列拆成两个序列,分别进行冒泡。当n为奇数时,分为n/2与n/2 + 1,所以ans = (n / 2) * (n / 2 - 1) / 2 + (n / 2) * (n / 2 + 1) / 2,当n为偶数时,分为两个n/2, 所以ans = (n / 2...
分类:
其他好文 时间:
2014-09-15 19:30:19
阅读次数:
134
枚举角度
Crazy Tank
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4305 Accepted Submission(s): 833
Problem Description
Crazy ...
分类:
其他好文 时间:
2014-09-09 21:37:19
阅读次数:
323
Description
After 4 years' waiting, the game "Chinese Paladin 5" finally comes out. Tomato is a crazy fan, and luckily he got the first release. Now he is at home, ready to begin his journey. But b...
分类:
其他好文 时间:
2014-09-05 18:21:51
阅读次数:
299
Crazy Search
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 23168
Accepted: 6513
Description
Many people like to solve hard puzzles some of which may le...
分类:
其他好文 时间:
2014-09-02 12:27:34
阅读次数:
208
Crazy Thairs
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 6598
Accepted: 1636
Description
These days, Sempr is crazed on one problem named Crazy Thair...
分类:
其他好文 时间:
2014-08-29 18:25:32
阅读次数:
201
This problem has been driving me crazy, and i can't work out how to fix it... Undefined symbols for architecture armv7: "_deflateEnd", referenced ...
分类:
其他好文 时间:
2014-08-18 21:50:23
阅读次数:
592
Crazy TypewriterTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 391Accepted Submission(s): 109Prob...
分类:
其他好文 时间:
2014-08-15 20:57:29
阅读次数:
508
~~~~
果然用map暴力直接超时。原来要用hash,第一次写hash,真是个好玩的东西。
题目链接:http://poj.org/problem?id=1200
注意:1.题目说文本是由字符组成的,所以要用ascll码作为下标。
2.hash数组要开大点,否则RE。
#include
#include
#include
#include
#include
#define N 1...
分类:
其他好文 时间:
2014-08-15 08:17:47
阅读次数:
233
Description
Many people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text. Such number could be the number of d...
分类:
其他好文 时间:
2014-08-14 23:55:56
阅读次数:
329