07 2015 档案

考研编程练习---StringMatching(后缀表达式)
摘要:题目描述: Finding all occurrences of a pattern in a text is a problem that arises frequently in text-editing programs. Typically,the text is a document b... 阅读全文

posted @ 2015-07-17 19:49 Alex0111 阅读(352) 评论(0) 推荐(0)

考研编程练习----递推数列(矩阵相乘法)
摘要:题目描述:给定a0,a1,以及an=p*a(n-1) + q*a(n-2)中的p,q。这里n >= 2。 求第k个数对10000的模。输入:输入包括5个整数:a0、a1、p、q、k。 输出: ... 阅读全文

posted @ 2015-07-09 12:51 Alex0111 阅读(277) 评论(0) 推荐(0)

P,NP,NPC的通俗解释
摘要:这或许是众多OIer最大的误区之一。你会经常看到网上出现“这怎么做,这不是NP问题吗”、“这个只有搜了,这已经被证明是NP问题了”之类的话。你要知道,大多数人此时所说的NP问题其实都是指的NPC问题。他们没有搞清楚NP问题和NPC问题的概念。NP问题并不是那种“只有搜才行”的问题,NPC问题才是。好... 阅读全文

posted @ 2015-07-06 17:13 Alex0111 阅读(1546) 评论(0) 推荐(0)

考研编程练习----Kruskal
摘要:#include <stdio.h> #include <stdlib.h> #define MAX 100 /* 定义边(x,y),权为w */ typedef struct { int x, y; int w; }edge; edge e[MAX]; /* rank[x]表示x的秩 */ int 阅读全文

posted @ 2015-07-06 15:35 Alex0111 阅读(292) 评论(0) 推荐(0)

考研编程练习----swap
摘要:void swap(int a ,int b){ a^=b; b^=a; //b =b^a^b //b = b^b^a;//b = a; 按位异或满足交换律 a^=b; //a = a^b^a //a = a^a^b;//a = b;} 阅读全文

posted @ 2015-07-06 14:35 Alex0111 阅读(176) 评论(0) 推荐(0)

考研编程练习----快速排序
摘要:voidsort(int*a,intleft,intright){if(left>=right)/*如果左边索引大于或者等于右边的索引就代表已经整理完成一个组了*/{return;}inti=left;intj=right;intkey=a[left];while(i=a[i])/*这是i在当组内向... 阅读全文

posted @ 2015-07-06 14:30 Alex0111 阅读(201) 评论(0) 推荐(0)

考研经验记录
摘要:二、数学推荐书:《北大燕园 数学复习全书》《金榜 660题》 《北大燕园 历年真题》学有余力推荐《李永乐数学决胜冲刺6+2》 。还是学有余力的话《北大燕园 全真模拟经典400题》 。 看《全书》的时候我喜欢把自己觉得难记的基础知识记到纸上,我认为全书对我帮助最大的就是这些基础知识。 《全书》课后题和... 阅读全文

posted @ 2015-07-05 17:36 Alex0111 阅读(188) 评论(0) 推荐(0)

考研编程练习----m叉树先序和后序所包含的情况
摘要:题目描述: We are all familiar with pre-order, in-order and post-order traversals of binary trees. A common problem in data structure classes is to find th... 阅读全文

posted @ 2015-07-05 15:28 Alex0111 阅读(204) 评论(0) 推荐(0)

导航