自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ACM!荣耀之路!

【已退役】

  • 博客(39)
  • 资源 (15)
  • 收藏
  • 关注

原创 CF#248DIV2:B. Kuriyama Mirai's Stones(线段树)

Kuriyama Mirai has killed many monsters and got many (namely n) stones. She numbers the stones from 1 to n. The cost of the i-th stone is vi. Kuriyama Mirai wants to know something about these sto

2014-05-26 13:32:59 2408 1

原创 CF#248DIV2:A. Kitahara Haruki's Gift

Kitahara Haruki has bought n apples for Touma Kazusa and Ogiso Setsuna. Now he wants to divide all the apples between the friends.Each apple weights 100 grams or 200 grams. Of course Kitahara Haru

2014-05-26 13:31:26 1979

原创 CSU1458:Booking

DescriptionInputOutputSample Input42 1201 2013-07-01 15:59 2013-07-08 16:302 2013-07-08 17:30 2013-07-15 12:003 6065 2013-07-08 14:30 2013-07-08 16:0032 201

2014-05-26 13:28:02 1005

原创 CSU1460: Kastenlauf(DFS)

DescriptionInputOutputSample Input220 01000 01000 10002000 100020 01000 02000 10002000 2000Sample OutputhappysadHINT题意:给出n+2点的坐标,看从1点能不

2014-05-26 13:26:12 1320

原创 CSU1459:Chess

DescriptionInputOutputSample Input3E 2 E 3F 1 E 8A 3 A 3Sample OutputImpossible2 F 1 B 5 E 80 A 3HINTSourceGCPC 2013

2014-05-26 13:23:00 1174

原创 ACdream1020:The Game about KILL

Problem DescriptionTeacher HU and his 40 students were trapped by the brigands. To show their power, the head of the brigands want to select one people to kill.Teacher HU and his 40 students wil

2014-05-24 12:24:12 1230

原创 ACdream1077:LCM Challenge

Problem DescriptionSome days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I want to make a big number with it.But I also don't want to use

2014-05-24 12:19:49 1661 2

原创 ACdream1012:Convex

Problem DescriptionWe have a special convex that all points have the same distance to origin point.As you know we can get N segments after linking the origin point and the points on the convex.

2014-05-24 12:13:31 1300

原创 ACdream1034:the cover circle

Problem Description用半径相等的两个圆覆盖一个w*h的矩形,要求两圆不相交且必须在矩形内。求覆盖面积最大时两圆半径。Input输入包含多组数据,EOF结束。每组数据包含一行,分别是两个实数w和h代表矩形的长和宽。0Output每组数据输出一行表示圆的半径,小数点后保留三位。Sample Input2.000 1.

2014-05-24 12:11:51 1229

原创 HDU4430:Yukari's Birthday(二分)

Problem DescriptionToday is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to place n ca

2014-05-22 21:41:44 3108 1

原创 HDU4033:Regular Polygon(二分+余弦定理)

Problem DescriptionIn a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes of the regular polygon, can you calculate t

2014-05-22 19:55:18 1996

原创 XTU1168:Alice and Bob(二维DP)

Problem DescriptionAlice and Bob always love to play games, so does this time. It is their favorite stone-taken game. However, this time they does not compete but co-operate to finish this tas

2014-05-19 22:13:29 1523

原创 XTU1202:逆序数

题目描述有n张卡片,分别标有数字1~n。有一天Silence把他们按某种序列排好,然后从第一张开始取出一张,再拿一张放到最后面,再取出一张,再拿出一张放到最后面...知道n张卡片全部取走。把取出的卡片按取出的顺序排好,正好是1,2,3,4,....,n。现在,告诉你n,Silence希望你帮他计算原来的序列的逆序数。例如,n=4时,原来的序列应该是1,3,2,4。这样,先取出卡片1

2014-05-19 00:56:25 1527

原创 XTU1201:模和除

题目描述两个整数x和y,满足1x%y是x除以y的余数, x/y是x除以y的商,即整数除。输入不超过1000组样例,每个样例占一行,包含两个整数a,b (1 输出每个样例输出一行,一个整数,表示答案。样例输入1 15 5100 100样例输出03227这道题纠结了很久,其实方法早就想出来了,就是实现方面有问题。

2014-05-19 00:50:14 1432

原创 XTU1200:ProblemCRC

题目描述现实中的网络通讯不够理想,经常会有bit从0变1,从1变0...为了检验是否出错 需要用到循环冗余校验CRC CRC冗余检验码包含两个部分 k位信息位+n位校验位,可由以下的步骤得到:1.将要传送的数据分段,每段k个bit,如果不足k位用0补齐2.对于每个长度为k的01序列M, 先在M后面加n个0得到新的M'.3.选定一个(n+1)位的01序列做为除数P,对M'

2014-05-19 00:40:22 1326

原创 XTU1199:Number Game

题目描述给你一个有N个数的集合S和一个数X,判断是否存在S的一个子集,子集里的数的最小公倍数正好是X。输入第一行是数据组数T。 接下来有多组数据,每组数据包含两行: 第一行有2个数N和X,1输出对于每一组数据,输出一行"Case #X: Y",X是第几组数据,Y是Yes或No。样例输入24 202 3 4 53 613 4 5样

2014-05-19 00:38:41 1027

原创 XTU1198:Candy(背包)

题目描述Henry和Lena最近买了很多各种各样的糖…他们决定把所有糖分了… 但是两个人都不希望自己糖的总重量比对方少太多, 鉴于不同的糖的味道不尽相同,所以每个糖都有一个yummy值。 Henry希望知道在两人得到的糖总质量差不大于m的时候,自己的糖yummy值之和的尽量大。输入有多组数据 每组数据第一行为两个整数,n,m,(1 输出每行输出一组数据的结果

2014-05-19 00:35:19 1303

原创 ACdream 1067:Triangles

Problem Description已知一个圆的圆周被N个点分成了N段等长圆弧,求任意取三个点,组成锐角三角形的个数。Input多组数据,每组数据一个N(N Output对于每组数据,输出不同锐角三角形的个数。Sample Input345Sample Output105分析:当3个点组成锐角三角形A

2014-05-17 11:30:50 1785

原创 ACdream 1066:Bet

Problem DescriptionJosnch星球是一个赌博之风盛行的星球。每个人一出生就有一定数额的钱,之后的所有收入只能由赌博获得(OMG,如果RP不好,输光了所有的钱。。。)假设赌博公司的某场赌博有N个结果,每个结果能获得的赔率比分别是a[1],a[2]...a[N]。假设现在XXX有X块钱,问他选择怎样的策略才能使得最坏情况下回报最大(假设N个结果中只有一个是有回报的,X块钱必

2014-05-17 11:29:12 1644

原创 ACdream 1061:郭式树

Problem Description郭橐驼,不知始何名。病偻,隆然伏行,有类橐驼者,故乡人号之驼。驼闻之,曰:“甚善。名我固当。”因舍其名,亦自谓橐驼云。   其乡曰丰乐乡,在长安西。驼业种树,凡长安豪富人为观游及卖果者,皆争迎取养。视驼所种树,或移徙,无不活;且硕茂,蚤实以蕃。他植者虽窥伺效慕,莫能如也。   有问之,对曰:“橐驼非能使木寿且孳也,以能顺木之天,以致其性焉尔。凡植木之性

2014-05-17 11:26:48 2368

原创 ACdream1008:A Very Easy Triangle Counting Game

Problem DescriptionSpeedcell and Shoutmon love triangles very much.One day,they are playing a game named “Triangle Counting”.In this game,Speedcell draws a round,and draws N points on the circum

2014-05-17 11:25:05 1351

原创 XTU1175:Hurry Up(三分)

Problem DescriptionGG is some what afraid of his MM. Once his MM asks, he will always try his best to rush to their home. Obvious, he can run home in straight line directly. Alternatively, he ca

2014-05-16 16:07:37 1565

原创 XTU1173:Five Tiger(模拟)

题目描述五虎棋是流传在东北民间的一种游戏,GG小的时候,经常被表哥虐得很惨。由于各个地区的规则可能不大相同,并且GG的回忆不一定很准,所以,如果规则和你平常玩的的有冲突,请以这里为主。棋盘是横五条,纵五条直线,形成25个交叉点,双方轮流把棋子放到交叉点上 (由于所需各自和棋子数目不多,才12+13,GG小的时候,用的是象棋的棋盘和棋子,真的用大棋盘很爽~~~)当双方把棋盘下满之后(

2014-05-15 22:48:40 1319

原创 XTU1154:Encode

题目描述行程编码是一种常见的无损压缩方式。比如针对于纯英文小写字符我们可以按以下方式进行编码:每个字节的低5位表示英文小写字母的序号(从0到25),高3位表示此字母连续的次数-1(0到7依次表示连续1到8次)。比如说一个字节的二进制为00100001,其表示字符串bb。给你一个字符串,试将字符串编码为对应的行程编码,并将编码字节的16进制输出。输入第一行是一个整数K,表示样

2014-05-14 22:34:55 929

原创 XTU1151:Bus(DP)

题目描述小强刚来到长沙这个大城市,发现这里有很多他老家没有的东西,其中一个就是公交车了。小强的家到学校有很多个公交站,每个公交站都有一个英文名字。小强很喜欢坐公交车,但是他有个奇怪的要求,就是公交车的上车站和下车站的英文名字必须是首字母相同的,且不在同一个站上下车,不然小强宁愿走过这个站去搭下一趟车,甚至直接走到学校。给出小强从家里到学校的之间每一个公交站的英文名字,问如果不往回走,小强最

2014-05-14 22:33:39 1025

原创 XTU1150:Assembly Line

题目描述胡大加工厂出产一种特殊零件。某天,客户到厂来查看零件。工厂生产的零件有三个质量等级从高到低分别为A、B、C,但是流水线上的零件质量参差不齐。为了给客户留下好的印象,胡大决定把流水线上的零件整理下,最前面既最左边为质量最高的A等级零件,接着为B、C等级的零件。胡大每次可以选择两个零件,互换其位置。为了节省体力,胡大想知道最少的互换次数。输入第一行是一个整数K,表示样例

2014-05-14 22:31:47 1124

原创 HDU4768:Flyer(二分)

Problem DescriptionThe new semester begins! Different kinds of student societies are all trying to advertise themselves, by giving flyers to the students for introducing the society. However, due

2014-05-13 21:31:54 2820

原创 HDU1551:Cable master(二分)

Problem DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest eve

2014-05-13 21:25:27 6306 2

原创 ZOJ3673:1729

1729 is the natural number following 1728 and preceding 1730. It is also known as the Hardy-Ramanujan number after a famous anecdote of the British mathematician G. H. Hardy regarding a hospital vis

2014-05-13 04:10:57 1889

原创 POJ3067:Japan(线段树)

DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <=

2014-05-13 01:23:34 2376

原创 ZOJ3672:Gao The Sequence

You are given a sequence of integers, A1,A2,...,An. And you are allowed a manipulation on the sequence to transform the origin sequence into another sequence B1,B2,...,Bn(Maybe the two sequences are s

2014-05-12 23:32:05 1666

原创 HDU3920:Clear All of Them I(状态压缩)

Problem DescriptionAcmers have been the Earth Protector against the evil enemy for a long time, now it’s your turn to protect our home.  There are 2 * n enemies in the map. Your task is to clear a

2014-05-12 20:55:22 1397

原创 ZOJ3675:Trim the Nails

Robert is clipping his fingernails. But the nail clipper is old and the edge of the nail clipper is potholed.The nail clipper's edge is N millimeters wide. And we use N characters('.' or '*') to rep

2014-05-12 20:49:58 1123

原创 ZOJ3671:Japanese Mahjong III

Mahjong is a game of skill, strategy and calculation and involves a certain degree of chance. In this problem, we concentrate on Japanese Mahjong, a variation of mahjong. For brief, all of the word ma

2014-05-12 20:41:26 12100

原创 ZOJ3669:Japanese Mahjong I

Mahjong is a game of skill, strategy and calculation and involves a certain degree of chance. In this problem, we concentrate on Japanese Mahjong, a variation of mahjong. For brief, all of the word ma

2014-05-12 20:39:53 59346

原创 POJ2288:Islands and Bridges(状态压缩)

DescriptionGiven a map of islands and bridges that connect these islands, a Hamilton path, as we all know, is a path along the bridges such that it visits each island exactly once. On our map, there

2014-05-06 23:15:51 1987

原创 POJ3254:Corn Fields(状态压缩)

DescriptionFarmer John has purchased a lush new rectangular pasture composed of M byN (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of square

2014-05-04 23:15:54 2984

原创 POJ2411:Mondriaan's Dream(状态压缩)

DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on,

2014-05-04 22:44:33 5040

原创 POJ1185:炮兵阵地(状态压缩)

Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网

2014-05-02 15:25:01 2527

《数值分析》课后答案

《数值分析》课后答案

2015-07-02

离散数学第四版_课后答案

离散数学第四版_课后答案

2015-07-02

JSP毕业设计

完整的毕业设计,代码+文档

2015-06-29

动态规划32讲

动态规划32讲

2013-12-29

最全的C++函数库

C++函数库

2013-12-29

编译原理

编译原理

2013-12-29

《数据结构》课程设计公园导游图

《数据结构》课程设计公园导游图

2013-12-29

代码行统计工具

代码行统计工具

2013-06-08

《数据结构》 严蔚敏的全部代码实现(C语言)

《数据结构》 严蔚敏的全部代码实现

2013-06-08

ACM必做50题

ACM必做50题的解题

2013-06-08

C/C++函数大全

函数大全

2013-06-08

背包九讲(背包)

背包九讲

2013-06-08

叶核亚 java程序设计实用教程 第三版课后答案

Java程序设计实用教程(第3版) (叶核亚) 电子工业出版社 案例及素材

2013-03-09

计算机程序设计艺术

非常有用的专业书籍! 很有用!

2012-10-20

空空如也

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

TA关注的人

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