随笔分类 -  hunting jobs

摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--voidquicksort(intu,intv){inti,m;if(u>=v)return;swap(u,randint(u,v));m=u;for(i=u+1;i<=v;++i)if(... 阅读全文
posted @ 2010-09-08 19:45 断桥残雪 阅读(299) 评论(0) 推荐(0)
摘要:支持的元字符有'^', '$', '.', '*',beautiful代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--intmatchhere(char*regexp,char*text){if(regexp[0]=='\0')return1;if... 阅读全文
posted @ 2010-09-08 19:17 断桥残雪 阅读(508) 评论(0) 推荐(0)
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--x=x*2;/*n(1+n)/2=x*/n=(int)sqrt(x);/*a*b=c^2thena<=c<=b,son<=sqrt(2x)<=n+1*/for(;n>=... 阅读全文
posted @ 2010-09-07 00:43 断桥残雪 阅读(198) 评论(0) 推荐(0)
摘要:大概思路:用一个变量记录当前搜索的步数m,枚举m步内的所有组合,为了保证唯一,按降序枚举代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--voidsplitN(intn,intm){for(inti=1;i<=n;++i){if(x[m-1]&... 阅读全文
posted @ 2010-09-07 00:19 断桥残雪 阅读(238) 评论(0) 推荐(0)