摘要:
(这篇随笔是 C++ Primer 5th ed. pp.39-40的摘录)Some characters, such as backspace or control characters, have no visible image. Such characters are non printab... 阅读全文
摘要:
传送门Solution:KM算法关于KM算法有一篇极好的文档http://www.cse.ust.hk/~golin/COMP572/Notes/Matching.pdfImplementation:#include #include #include #include using namespac... 阅读全文
摘要:
随机增量算法(a randomized incremental algorithm)#define sqr(x) ((x)*(x))#define EPS 1e-4struct P{ double x, y; P(double x, double y):x(x),y(y){} P(... 阅读全文
摘要:
example POJ 2229 Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KDescriptionIn this problem, you have to analyze a particular sorting algorith... 阅读全文
摘要:
getchar()和scanf("%c")的功能都是从STDIN读一个字符,单论功能两者没有区别。但两者的返回值是有区别的:------------------------------------------------scanf()的详尽介绍请移步这里。----------------------... 阅读全文
摘要:
传送门 Time Limit: 2000MS Memory Limit: 65536K Description Farmer John is an astounding accounting wizard and has realized he might run out of money to r 阅读全文
摘要:
传送门 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 14761 Accepted: 7407 Description The little cat is so famous, that many couples tramp o 阅读全文
摘要:
Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 38908 Accepted: 16170 Description Given two strings a and b we define a*b to be their conca 阅读全文
摘要:
KMP算法是基本的字符串匹配算法,但是代码实现上有一些细节容易错。这篇随笔将认真总结一下。 KMP算法的核心是: The KMP algorithm searches for occurrences of a "word" W within a main "text string" S by emp 阅读全文
摘要:
time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standard $\DeclareMathOperator{\XOR}{XOR}$ The sequence of non- 阅读全文