现在位置: 首页 > catacombs发表的所有文章
  • 11月
  • 09日
综合 ⁄ 共 706字 评论关闭
求最长上升公共子串 f【i】【j】表示a(1,i),b(1,j)取以b【j】结尾的最大公共上升子串的大小 当a【i】 != b【j】 时,f【i】【j】 = f【i - 1】【j】 否则:f【i】【j】 = max { f【i - 1】【(1……j - 1)】 && (a[i] > b[1……j - 1])}; #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAXN 205 int a[MAXN]; int f[MAXN][MAXN]; int main() { int T, N; for(scanf("%d", &T); T--; ) { scanf("%d", &N); for(int i = 1; i <= N;......
阅读全文
  • 05月
  • 13日
综合 ⁄ 共 5080字 评论关闭
zz:http://www.vista123.com/vista/1762.html     【Vista之家 原创】Windows Vista终极减肥瘦身   关于Vista瘦身的话题,Vista之家 之前曾经发表过文章:   1、【Vista之家原创】疯狂,1分钟Vista瘦身2G,无影响!   2、【Vista之家荐】Vista瘦身大法,不用任何软件减肥2.5G!   而且Vista之家 团队还专门开发了Vista瘦身大师 ,集成在了Vista优化大师 里面,专门用来给Vista减肥的世界独家软件。   然而,时至今日,还是发现了一些问题,例如驱动被瘦身之后,连插入USB闪存都无法识别。所以,今天再来整理一下,......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 8289字 评论关闭
优化时,把hive sql当做map reduce程序来读,会有意想不到的惊喜。 理解hadoop的核心能力,是hive优化的根本。这是这一年来,项目组所有成员宝贵的经验总结。   长期观察hadoop处理数据的过程,有几个显著的特征: 1.不怕数据多,就怕数据倾斜。 2.对jobs数比较多的作业运行效率相对比较低,比如即使有几百行的表,如果多次关联多次汇总,产生十几个jobs,没半小时是跑不完的。map reduce作业初始化的时间是比较长的。 3.对sum,count来说,不存在数据倾斜问题。 4.对count(distinct ),效率较低,数据量一多,准出问题,如果是多co......
阅读全文
  • 01月
  • 19日
综合 ⁄ 共 528字 评论关闭
题目描述:  假设有一个没有头指针的单链表。一个指针指向此单链表中间的一个节点(非第一个节点, 也非最后一个节点)。 请将该节点从单链表中删除。 分析与解答: 若要删除该节点,正常情况下,应该要知道该节点的前面节点的指针, 但是由于单链表中没有头结点,所以无法追溯到该节点前面的那个节点, 设该节点为B,下一个节点为C。那么,首先将B节点的内容替换为C节点的内容, 然后,将C节点删除,这样就达到了我们的目的。 代码如下: pcur->next = pnext->next; pcur->data = pnext->date; delete pnext; 扩展题......
阅读全文
  • 12月
  • 20日
综合 ⁄ 共 1087字 评论关闭
http://finance.sina.com.cn/money/fund/20110602/01489934342.shtml 2011年06月02日   从年初至昨日,基金前5个月的业绩表现已经出炉。在这5个月的时间内,A股市场坐了一趟 “小过山车”,上证指数先是一举站上3067.46高点,随后一路跌至2700多点。   截至5月31日,上证指数年内下跌2.30%,而偏股型基金表现较差,平均跌幅高达9.06%;首尾业绩差距更是达到28.38个百分点。   仅17只基金实现正收益   近期大盘持续破位下行,偏股型基金表现不佳,不少基金将今年一季度的浮盈一并吞噬。今年以来前五个月,494只偏股型A股基金(......
阅读全文
  • 12月
  • 18日
综合 ⁄ 共 1754字 评论关闭
日月明王BLOG   http://sunmoonking.spaces.live.com      Oracle Parallel Query(OPQ)可以将一个SQL statement分成多个片(chunks),然后在独自的CPU上通过多个process进行并行运行。典型的应用是:full table scans, creating or rebuilding an index ,one or more partitions of an index,Partition operations such as moving or splitting partitions,CREATE TABLE AS SELECT   operations  if the SELECT involves a full table or partition scan 。INSERT INTO . . . SELECT operations, if the SELECT involves a ful......
阅读全文
  • 10月
  • 22日
综合 ⁄ 共 2017字 评论关闭
在上一章节中我们把章节数改为2 /* 这个函数是显示tableview的章节数*/ -(NSInteger)numberOfSectionsInTableView:(UITableView*)tableView {     return 2; } 我们只要设置标题头尾的宽度就可以看见了 /*设置标题头的宽度*/ -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {     return 20; } /*设置标题尾的宽度*/ -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {     return 20;  } /*设置标题头的名称*/ ......
阅读全文
  • 10月
  • 11日
综合 ⁄ 共 1306字 评论关闭
//求出两两lca,其中有两个相同,答案则为另一个 #include<iostream> #include<cstdio> using namespace std; struct data{ int to,next; }e[1000001]; int n,m,cnt,head[500001],deep[500001],fa[500001][20]; bool vis[500001]; inline int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x*=10;x+=ch-'0';ch=getchar();} return x*f; } void insert(int u,int v){e[++cnt]=(data){v,hea......
阅读全文
  • 05月
  • 08日
综合 ⁄ 共 3694字 评论关闭
1072. Gas Station (30) 时间限制 200 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must guarantee that all the houses are in its service range. Now given the map of the city and several candidate locations for the gas station, you are supposed to give the best recommendat......
阅读全文
  • 09月
  • 09日
综合 ⁄ 共 1242字 评论关闭
文章目录   第二种方法:使用 Infragistics NetAdvantage控件。   在上一篇文章中提到了用asp.net自带的MultiView+Menu实现tabPage,功能实现了,但总感觉在外观上与真正的tabPage相差较大。如果你是网页美工高手,那么你可以通过某些手段改变它们的外观,使它尽量和Windows程序里的TabPage相接近,但本人还真不懂怎么弄,真是对不住大家!话说回来,如果你知道怎么调整,那么请不吝赐教!毕竟我也是个新手,先谢谢了!下面介绍一下怎样加入一个真真正正的tabPage(tabCont......
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 1808字 评论关闭
******************************************************************************************************************** 我已参加2014“博客之星的”评选,觉得我的文章对您有帮助的,请投上您宝贵的一票 ***********************************************************************************************************************  GTK 2.0 在windows运行下,会出现文本框无法输入的问题。这个查找了很多资料,说是2.0版本的问题,目前还未找到好的解决方法。但是使用GTK3.0没有影响。而GTK3.0在设置控件背景图片没有找到合适......
阅读全文
  • 11月
  • 20日
综合 ⁄ 共 2039字 评论关闭
Radar Installation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 45922   Accepted: 10252 Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the sea can be covered by a radius installation, if the distance between them is at most d.  We use Cartesian c......
阅读全文