上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页
摘要: 阅读全文
posted @ 2011-10-12 15:22 Mose 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Programming Contest Problem TypesHal Burch conducted an analysis over spring break of 1999 and made an amazing discovery: there are only 16 types of programming contest problems! Furthermore, the top several comprise almost 80% of the problems seen at the IOI. Here they are:Dynamic ProgrammingGreedy 阅读全文
posted @ 2011-09-28 15:05 Mose 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 地址很有规律,如:08年January的地址:http://ace.delos.com/JAN08其它的按规则自己推一下。 阅读全文
posted @ 2011-09-28 07:53 Mose 阅读(153) 评论(0) 推荐(0) 编辑
摘要: http://woodpecker.org.cn/简明Python教程Dive Into Python中文版Dive Into Python 3中文版 阅读全文
posted @ 2011-09-23 07:57 Mose 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 2-1 Insertion sort on small arrays in merge sortAlthough merge sort runs in(n lg n) worst-case time and insertion sort runsin(n^2) worst-case time, the constant factors in insertion sort make it faster forsmall n. Thus, it makes sense to use insertion sort within merge sort when subprob-lems become 阅读全文
posted @ 2011-09-05 08:47 Mose 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 一直对电子书及其格式有兴趣,今天无意之中发现adobe acrobat X居然已经支持PDF与其他文件格式之间的自动转化(包括OCR方式),而且效果出乎意外的好!看来以后我的kindle3有福了,呵呵!具体操作及参数设置参考:http://help.adobe.com/en_US/acrobat/pro/using/WS58a04a822e3e50102bd615109794195ff-7eeb.w.htmlhttp://help.adobe.com/en_US/acrobat/pro/using/WS58a04a822e3e50102bd615109794195ff-7ef2.w.html# 阅读全文
posted @ 2011-09-01 08:20 Mose 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 [问题描述]给定两个自然数n,r(n>r),输出从数I到n中按降序顺序取r个自然数的所有组合。例如,n=5,r=3时,输出的结果是5 4 35 4 25 4 15 3 25 3 15 2 14 3 24 3 14 2 13 2 1程序中用a1,a2,…ar表示一个降序排列的r个数的组合,要求a1≥r。为了能够穷举出全部降序排列的r个数的组合,按递减顺序调整前一个组合的部分元素生成下一个组合。调整时,当ar=1就要回溯;另外,调整或回溯后,ai+i≤r时,也要回溯 阅读全文
posted @ 2011-07-29 10:55 Mose 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 最大质因数和(prime) 题目描述 定义一个数的质因数和为它的所有质因数之和。给出n个正整数,对于每个正整数,输出2到这个数之间所有数中质因数和最大的数的质因数和。 输入格式 第一行一个正整数n(n<=500000),接下来n行每行有一个正整数ai(2<=ai<=1000000)。 输出格式 共n行,对于每一个ai输出符合题意的结果。 样例输入 1 2 样例输出 2解法:先生成1000000以内所有数的质因数和(利用类似筛法求素数),然后数组s中存最大的质因数和,且有递推式s[i]=max(s[i-1],a[i]),然后读入,再从s中读取const max=1000000; 阅读全文
posted @ 2011-04-14 08:57 Mose 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Word IndexTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 3200Accepted: 1831DescriptionEncodingschemes are often used in situations requiring encryption orinformation storage/transmission economy. Here, we develop a simpleencoding scheme that encodes particular types of words with five orfe 阅读全文
posted @ 2011-04-14 08:52 Mose 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 以下是几种常见排序: 1 const max=100;n=10; 2 var i:integer; 3 a,b:array[1..n] of integer; 4 procedure swap(var a,b:integer); 5 var t:integer; 6 begin 7 t:=a;a:=b;b:=t; 8 end; 9 procedure print; 10 var i:integer; 11 begin 12 for i:=1 to n do 13 write(a[i],' '); 14 writeln; 15 end; 16 procedure createAr 阅读全文
posted @ 2011-03-22 11:03 Mose 阅读(141) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页