- 博客(30)
- 资源 (1)
- 收藏
- 关注
原创 使用Tokyo Cabinet数据库,引出的编译问题。
错误的Makefile如下:CFLAGS = -g -Walllib= /usr/local/libinclude= /usr/local/includeTCCFLAGS = -g -Wall -I$(include) -L$(lib) -ltokyocabinet -lz -lbz2 -lrt -lpthread -lm -lctestdb: dbops.o testdb.o
2015-03-11 10:34:11 760
原创 运行ldconfig后,导致Gnome出现的问题
背景: 装了tokyocabinet这个数据库后,运行编写的程序,发现"cannot open shared object file",经过Google,是要运行ldconfig /usr/local/lib(有错误)才能解决这个问题,运行后,程序确实可以跑起来了。那么,问题来了,当我重启的时候,发现Gnome的登录界面已经不见了,通过图形界面进入不了系统了。一直百度Google,
2015-01-30 11:44:57 716
转载 Linux 内核之时间篇
本系列文章的前两节讨论了用于计时的时钟源:clocksource,以及内核内部时间的一些表示方法,但是对于真实的用户来说,我们感知的是真实世界的真实时间,也就是所谓的墙上时间,clocksource只能提供一个按给定频率不停递增的周期计数,如何把它和真实的墙上时间相关联?本节的内容正是要讨论这一点。1. 时间的种类内核管理着多种时间,它们分别是:RTC时间wall time:墙上
2015-01-19 14:52:38 1094
原创 拦截系统调用的实现以及要注意的问题
在2.6.32实现拦截系统调用1.获取sys_call_table的地址方法1:从/boot/System.map中取到sys_call_table的地址由上图所看:第一:sys_call_table是只读的,下面是如何使得它变为RW。 第二:这种方法获取的sys_call_table只是针对本机的,可移植性差方法2:参考来源于:ht
2015-01-09 12:46:48 1213
原创 系统调用宏SYSCALL_DEFINE
本文讲解x86中系统调用的过程,以read系统调用为例。1.系统调用号:arch/x86/include/asm/unistd_64.h#define __NR_read 0__SYSCALL(__NR_read, sys_read)2.系统调用表:sys_call_table内核记录了系统调用表中所有已注册过的系统调用的列表,存储在sys_call_table
2014-12-30 15:08:28 2638
原创 linux内核mount系统调用源码分析
@Author: Gordon 0.摘要mount是Linux很常见的命令,本文将从用户空间的命令行开始,一步一步切入到内核的源代码,解释一个文件系统是如果挂载的。本文基于linux 2.6.321.SYSCALL_DEFINE5, 系统调用Linux kernel通过系统调用的方式为用户提供陷入到内核,mount的系统调用是SYSCALL_DEFIN
2014-12-16 14:38:56 7577
原创 Poj 2371--Questions and answers(QSort)
题目:http://poj.org/problem?id=2371题意:先输入N个数,再输入K个数,问这K个数Ki,问N个数中第Ki个数是什么;思路:先排序,好久没写快排了,复习复习源代码:(47MS)#includeusing namespace std;const int MAX_N=100005;int a[MAX_N];int n;int
2012-04-19 16:05:29 656
原创 POJ 2752--Seek the Name, Seek the Fame (next)
Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7484 Accepted: 3520DescriptionThe little cat is so famous, that many couples
2012-04-19 10:06:54 636
原创 POJ 1639:Picnic Planning(最小度限制生成树)
Picnic PlanningTime Limit: 5000MS Memory Limit: 10000KTotal Submissions: 7356 Accepted: 2555DescriptionThe Contortion Brothers are a famous set of circus clowns
2012-04-18 12:34:18 1052
原创 POJ 1094:Sorting It All Out(拓扑排序+传递闭包)
Sorting It All OutTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 19834 Accepted: 6784DescriptionAn ascending sorted sequence of distinct values is on
2012-04-15 15:27:58 802
原创 POJ 3026--Borg Maze (BFS+Prim)
Borg MazeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5258 Accepted: 1756DescriptionThe Borg is an immensely powerful race of enhanced humanoids from t
2012-04-15 12:27:15 976
原创 POJ 2031:Building a Space Station (Prim)
Building a Space StationTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 2516 Accepted: 1330DescriptionYou are a member of the space station engineering te
2012-04-13 23:20:07 686
原创 POJ 1860:Currency Exchange(Bellman_Ford算法)
Currency ExchangeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 12217 Accepted: 4120DescriptionSeveral currency exchange points are working in our ci
2012-04-13 19:21:12 2843 1
原创 HDU 2243:考研路茫茫——单词情结(AC自动机+矩阵二分幕和)
考研路茫茫——单词情结Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 765 Accepted Submission(s): 222Problem Description背单词,始终是复习英语的重要环节
2011-09-11 11:19:43 1045
原创 POJ 2778:DNA Sequence(AC自动机+矩阵快速幂)
DNA SequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6232 Accepted: 2213Description
2011-09-10 12:13:36 948
原创 HDU 3347:Calculate the expression
Calculate the expressionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 399 Accepted Submission(s): 214Problem DescriptionYou
2011-09-09 23:45:40 911
原创 POJ 3691:DNA repair(AC自动机+DP)
DNA repairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3353 Accepted: 1487Description
2011-09-09 11:55:03 2999 2
原创 HDU 3065:病毒侵袭持续中(AC自动机)
病毒侵袭持续中Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1662 Accepted Submission(s): 610Problem Description小t非常感谢大家帮忙解决了他的上一个问
2011-09-06 22:46:12 731
原创 HDU 2896:病毒侵袭(AC自动机)
病毒侵袭Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2460 Accepted Submission(s): 635Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,
2011-09-05 22:35:36 449
原创 HDU 1711:Number Sequence(KMP)
Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3411 Accepted Submission(s): 1539Problem DescriptionGiven two
2011-09-02 23:41:06 432
原创 HDU 1251:统计难题
统计难题Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 7389 Accepted Submission(s): 2839Problem DescriptionIgnatius最近遇到一个难题,老师交
2011-09-02 21:16:30 443
原创 HDU 1247:Hat’s Words(字典树)
Hat’s WordsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2205 Accepted Submission(s): 804Problem DescriptionA hat’s word is
2011-09-02 20:30:52 1715
原创 poj 1204:Word Puzzles(AC自动机)
Word PuzzlesTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 5727 Accepted: 2173 Special Judge
2011-09-02 12:51:26 644
原创 hdu 2222:Keywords Search(AC自动机模板)
Keywords SearchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10685 Accepted Submission(s): 3696Problem DescriptionIn the mo
2011-08-31 17:35:20 717
转载 AC自动机算法详解
AC自动机算法详解 首先简要介绍一下AC自动机:Aho-Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段包含m个字符的文章,让你找出有多少个单词在文章里出现过。要搞懂AC自动
2011-08-30 23:48:25 444
原创 poj 1961:Period (KMP)
PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 8083 Accepted: 3559DescriptionFor
2011-08-28 16:11:11 428
原创 poj 2406:Power Strings(KMP)
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 18825 Accepted: 7857Description
2011-08-28 15:52:10 399
原创 poj 3461:Oulipo(KMP模版)
OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8708 Accepted: 3419DescriptionThe
2011-08-28 14:58:17 460
原创 POJ 2001:Shortest Prefixes(字典树)
Shortest PrefixesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 7290 Accepted: 3054Descript
2011-08-28 10:09:33 492
原创 POJ 1087:A Plug for UNIX(最大流)
<br />#include<iostream>#include<string>using namespace std;const int maxn=505;//按照题意开305,RuntimeError,估计题目给错范围了,应该有两个是200,而不是100const int INF=0x7ffffff;int c[maxn][maxn],q[maxn],dep[maxn];int match(int &n,char c1[30],char str[][30]){ for(i
2011-04-30 00:54:00 382
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人