Problem Description
Teacher Mai has an integer x.
He does the following operations k times. In the i-th operation, x becomes the least integer no less than x, which is the multiple of i.
He wan...
分类:
其他好文 时间:
2014-08-14 20:39:59
阅读次数:
256
Given an array of strings, return all groups of strings that are anagrams....
分类:
其他好文 时间:
2014-08-14 20:39:29
阅读次数:
219
时光荏苒,一路走来算是跌跌撞撞。本身处于全国贫困县的娃,家里的生活也不算好,高考成绩也很差。所以也就没有选择就读那所自己感觉很烂的大专……!其实主要原因还是家里条件不好,自己上网也查询了当时的就业状况,按照当时的就业率和毕业后的薪资,想想还是不要给家里增加负担了。学习这个技术也意外的事,听哥哥讲这个是高薪工作,于是就了解一下,比较一下,感觉还是学习这个技术靠谱一点。当时就想自己努力学习肯定不会太差...
分类:
其他好文 时间:
2014-08-14 20:39:19
阅读次数:
221
Problem Description
Teacher Mai has a kingdom. A monster has invaded this kingdom, and Teacher Mai wants to kill it.
Monster initially has h HP. And it will die if HP is less than 1.
Teacher Ma...
分类:
其他好文 时间:
2014-08-14 20:39:09
阅读次数:
283
poj 3461 Oulipo(KMP模板题)...
分类:
其他好文 时间:
2014-08-14 20:38:29
阅读次数:
273
首先声明,本人并不是搞大数据的,文中跟大数据相关的知识若有不对还请各位指点。本人只是试图从另一个角度来阐述大数据的产生。
IT的第一个字母表示的是information,我们现在的所有技术(IT行业)其实归根结底就是对信息的处理。...
分类:
其他好文 时间:
2014-08-14 20:38:19
阅读次数:
195
IPC对象,既我们所说的进程间通信,下面就来总结一下都有哪些.。。。...
分类:
其他好文 时间:
2014-08-14 20:37:59
阅读次数:
308
Remmarguts' Date
Time Limit: 4000MS
Memory Limit: 65536K
Total Submissions: 21064
Accepted: 5736
Description
"Good man never makes girls wait or breaks an appointme...
分类:
其他好文 时间:
2014-08-14 20:37:39
阅读次数:
266
hdu 4878 ZCC loves words(AC自动机+dp+矩阵快速幂+中国剩余定理)
题意:给出若干个模式串,总长度不超过40,对于某一个字符串,它有一个价值,对于这个价值的计算方法是这样的,设初始价值为V=1,假如这个串能匹配第k个模式串,则V=V*prime[k]*(i+len[k]),其中prime[k]表示第k个素数,i表示匹配的结束位置,len[k]表示第k个模式串的长度(注...
分类:
其他好文 时间:
2014-08-14 20:37:19
阅读次数:
359
hdu 4950 Monster(数学题,多校8)...
分类:
其他好文 时间:
2014-08-14 20:37:09
阅读次数:
208
LRJ算法入门经典第二版上面写错了,害得我想了半天。。。
V : 点数, E :边数 F :面数
欧拉公式 V - E + F = 2;
V = n + n / 4 sum(i * (n - 2 - i)); [ 0
E = n + n / 2 sum((i * (n - 2 - i ) + 1); [ 0
代码实现:
#include
#include
#include
#...
分类:
其他好文 时间:
2014-08-14 20:36:59
阅读次数:
280
请尊重原作者的辛苦劳动,转载请注明出处。
实践是检验真理的唯一标准。下面就让我们在实践中认识copy和mutableCopy的共同点和区别。
1.copy和mutableCopy的实现过程。
想要一个对象能实现copy首先要继承NSCopying的协议,然后实现+ (id)copyWithZone:(struct _NSZone *)zone,mutableCopy对应的是NSMutable...
分类:
其他好文 时间:
2014-08-14 20:36:49
阅读次数:
158
题意 给你两个字符串p和s 求p在s中出现的次数 很裸的kmp
因为不止匹配一次 每次找到后还要循环j=next[j]的过程 知道到达s的终点
#include
#include
using namespace std;
const int N = 10005, M = 1000005;
int next[N], ans, n;
char p[N], s[M];
void kmp...
分类:
其他好文 时间:
2014-08-14 20:36:39
阅读次数:
248
大家都知道,do…while(condition)可以表示循环,但你有没有遇到在一些宏定义中可以不用循环的地方,也用到了 do…while.比如:#define DELETE_POINTER(p) do { if(NULL != p)...
分类:
其他好文 时间:
2014-08-14 20:36:09
阅读次数:
215
hdu4952 Number Transformation(数学题 | 找规律)...
分类:
其他好文 时间:
2014-08-14 20:35:59
阅读次数:
230