自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

kongming_acm的专栏

如果不能正常显示代码 ,请右键->查看源文件 来查看源代码 里面有代码部分 另外由于网站原因 \n在博客里都显示是/n 请自己更改

  • 博客(24)
  • 资源 (7)
  • 收藏
  • 关注

转载 poj 1032 Parliament 把自然数N分解成若干个互不相同的正整数,使乘积最大;

<br />若 把自然数N分解成若干个正整数(可以相同),使乘积最大,方法是: a[n]=3*a[n-3]; if(n<=4) return n;<br /> <br /> <br /> <br /> ParliamentTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12324 Accepted: 5134<br />DescriptionNew convocation of The Fool Land's Parliament cons

2011-02-28 12:11:00 5754

原创 poj 1029 False coin 检验硬币真假

False coinTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12026 Accepted: 3230<br />DescriptionThe "Gold Bar"bank received information from reliable sources that in their last group of N coins exactly one coin is false and differs in weight from

2011-02-28 11:19:00 1013

原创 poj 1023 The Fun Number System

The Fun Number SystemTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6857 Accepted: 2131<br />DescriptionIn a k bit 2's complement number, where the bits are indexed from 0 to k-1, the weight of the most significant bit (i.e., in position k-1), i

2011-02-28 10:38:00 786

原创 poj 1020 Anniversary Cake 简单dfs

Anniversary CakeTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11377 Accepted: 3574<br />DescriptionNahid Khaleh decides to invite the kids of the "Shahr-e Ghashang" to her wedding anniversary. She wants to prepare a square-shaped chocolate cake

2011-02-27 18:43:00 719

原创 poj 1018 Communication System 贪心

<br />Communication SystemTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14261 Accepted: 4993<br />DescriptionWe have received an order from Pizoor Communications Inc. for a special communication system. The system consists of several devices. F

2011-02-27 15:15:00 639

原创 poj 1019 Number Sequence 两次二分

<br />Number SequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 22614 Accepted: 6031<br />DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk

2011-02-27 13:47:00 900

原创 poj 1017 Packets

<br />PacketsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 28810 Accepted: 9481<br />DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always d

2011-02-27 10:52:00 616

原创 poj 1013 Counterfeit Dollar 已知12个球中有1个重量与众不同,用3次找出此球,并判断重量轻重

<br />Counterfeit DollarTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 27975 Accepted: 8755<br />DescriptionSally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even

2011-02-27 10:12:00 897

原创 hdu 1060 the leftmost digit 计算N^N最左面的一位数

<br />Leftmost DigitTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 4901    Accepted Submission(s): 1793<br /><br /><br />Problem DescriptionGiven a positive integer N, you should output the lef

2011-02-26 19:29:00 807

原创 poj 1062 昂贵的聘礼 枚举+最短路

<br />昂贵的聘礼Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18272 Accepted: 4873<br />Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就

2011-02-26 10:08:00 587

原创 poj 2121 Inglish-Number Translator 将英文翻译成罗马数字

Inglish-Number TranslatorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2822 Accepted: 1107<br />DescriptionIn this problem, you will be given one or more integers in English. Your task is to translate these numbers into their integer representa

2011-02-25 23:24:00 2252

原创 fzu 1715 Ball and Box n个不同的求放到m个不同的盒子中方法的个数

<br />1715 Ball and BoxAccept: 120    Submit: 288<br />Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem DescriptionCDGG has r different boxes and n different balls.He want to put the n balls into the r boxes,and it is not allow to left empty box.Ho

2011-02-25 19:44:00 984

原创 fzu 1570 集合划分问题 第二类斯特林数 n个不同小球放到m个相同的盒子的方法个数

Problem 1570 集合划分问题http://acm.fzu.edu.cn/problem.php?pid=1570Accept: 250    Submit: 671Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Descriptionn个元素的集合{1,2,...,n}可以划分若干个非空子集。例如,当n=4时,集合{1,2,3,4}可以划分为15个不同的非空子集如下: {{1},{2},{3},{4}},{{1,2},{3}

2011-02-25 19:26:00 1684

转载 poj 1664 放苹果 将m个相同的苹果放进n个相同的盘子中,盘子允许空,有多少种方法

把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 Output对输入的每组数据M和N,用一行输出相应的K。Sample Input1

2011-02-25 17:48:00 8917

原创 poj 1328 Radar Installation 已知一定数量的区间,求最小数量的点,使得每个区间内斗至少存在一个点 贪心

Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 23954 Accepted: 5130DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locatin

2011-02-25 16:49:00 959

原创 poj 2421 Constructing Roads 最小生成树(已经存在几条边) KRUSKAL

<br />Constructing RoadsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 13066 Accepted: 5221<br />DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each ot

2011-02-25 16:01:00 469

原创 poj 2085 Inversion 已知数个数为n,逆序数为ver,求最小满足条件的排列

<br />InversionTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 2937 Accepted: 1308<br />DescriptionThe inversion number of an integer sequence a1, a2, . . . , an is the number of pairs (ai, aj) that satisfy i < j and ai > aj . Given n and the inv

2011-02-25 09:39:00 919

原创 poj 2140 Herd Sums 判断S由连续的自然数组成共有几种情况

<br />Herd SumsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11551 Accepted: 6891<br />DescriptionThe cows in farmer John's herd are numbered and branded with consecutive integers from 1 to N (1 <= N <= 10,000,000). When the cows come to the ba

2011-02-24 19:05:00 1185

原创 poj 1980 Unit Fraction Partition 分数划分,将分数分解为n个真分数之和,分母乘积不超过a

<br />Unit Fraction PartitionTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 2797 Accepted: 1077<br />DescriptionA fraction whose numerator is 1 and whose denominator is a positive integer is called a unit fraction. A representation of a positive

2011-02-24 16:54:00 1899 1

原创 pku 2231 Moo Volume 线性方法求sig(sig|a[i]-a[j]|)

<br />Moo VolumeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12801 Accepted: 3690<br />DescriptionFarmer John has received a noise complaint from his neighbor, Farmer Bob, stating that his cows are making too much noise. <br /><br />FJ's N cow

2011-02-24 14:39:00 676

原创 pku 1068 Parencodings

ParencodingsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11249 Accepted: 6635<br />DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: <br />q By an integer sequence P = p1 p2...pn whe

2011-02-22 11:25:00 697 2

原创 pku 1026 Cipher 置换群

CipherTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 13732 Accepted: 3470<br />DescriptionBob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but their encoding and decoding is based on sec

2011-02-22 11:09:00 463

原创 hdu 1005 Number Sequence 矩阵连乘

Number Sequence<br />Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 37463    Accepted Submission(s): 7885<br /><br />Problem DescriptionA number sequence is defined as follows:<br /><br />f(1)

2011-02-21 19:55:00 672

原创 hdu 1002 大数之java小试牛刀

A + B Problem II<br />Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 72105    Accepted Submission(s): 13179<br /><br />Problem DescriptionI have a very simple problem for you. Given two integer

2011-02-21 18:30:00 1051

自己的ACM题库和模板

自己的ACM题库和模板

2012-02-04

java聊天室

java聊天室

2011-12-29

dancing links

DLX dancinglinks 跳舞链

2011-12-29

拓展 KMP edtend MP

给定一个串S,定义n=|S|,extend[i]表示S与S[i…n]的最长公共前缀长度。我们可以在线性时间内得到所有的extend[i]。 鉴于已有论文对这个算法进行细致、感性的描述,在此就不花费篇幅赘述这一算法。如果您想详细了解这一算法,可以参见《寻找最大重复子串》(作者林希德)和《求最长回文子串与最长重复子串》(作者何林)。

2011-04-14

joj 部分题目答案 自己做的 仅供参考

joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考

2010-07-10

递推求解 集合了递推的一些题目

在一个平面上有一个圆和n条直线,这些直线中每一条在圆内同其他直线相交,假设没有3条直线相交于一点,试问这些直线将圆分成多少区域。

2010-07-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除