自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(59)
  • 收藏
  • 关注

原创 Largest prime factor

Largest prime factorTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6261 Accepted Submission(s): 1921 Problem Descripti

2016-10-27 21:53:44 460

原创 Leftmost Digit

Leftmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3444 Accepted Submission(s): 1525 Problem DescriptionGi

2016-10-27 21:45:29 201

原创 2016.10.26总结

上一周至今,主要就是做了acm step,第一章全部做完了,第二章做了一些,以后基本应该就是一周一章,刚开始不太难,尽量快一些,做到现在还是比较简单吧,比赛什么的也就看了看题,想了想想不出来就放弃了,现在主要精力就在这个step上,有时候会翻书看看知识,觉得还是先学知识再说,贴一个比较有意思的题吧,这个应该是第一章ac比较少的了   排序Problem Description输入一

2016-10-26 17:43:57 80

原创 2016.9.25总结

不知不觉开学快一个月了,刚开始的时候真是很难进入状态,一开学就盼着月饼节,过完了又只想给祖国母亲庆生,时间一闪而过,却没有学到多少东西,真是后知后觉。  开学这段时间,主要看了单调队列和线段树,树状数组也看了一些,基本知识是了解了,看题的时候也是停留在差不多看懂代码就行,结果还是不会用,等于废了,经历了几个网络赛,感受到深深的绝望,加上老师开会时说的话,顿觉荒废时间太严重,惰性太大,有时候看了

2016-09-25 11:11:00 255

原创 2016SDAU编程练习三1007

Problem G Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游

2016-05-29 11:27:05 203

原创 2016SDAU编程练习三1004

Problem D Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows

2016-05-29 11:22:08 184

原创 2016SDAU编程练习三1023

Problem W Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),

2016-05-17 19:55:04 260

原创 2016SDAU编程练习三1018

Problem R Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound M

2016-05-17 19:53:17 221

原创 2016SDAU编程练习三1017

Problem Q Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he we

2016-05-17 19:50:07 227

原创 2016SDAU编程练习三1016

Problem P Problem Description在一无限大的二维平面中,我们做如下假设:1、  每次只能移动一格;2、  不能向后走(假设你的目的地是“向上”,那么你可以向左走,可以向右走,也可以向上走,但是不可以向下走);3、  走过的格子立即塌陷无法再走第二次;求走n步不同的方案数(2种走法只要有一步不一样,

2016-05-17 19:47:47 200

原创 2016SDAU编程练习三1015

Problem O Problem DescriptionGive you a number on base ten,you should output it on base two.(0 < n < 1000) InputFor each case there is a postive number n on base ten, end of fi

2016-05-17 19:45:51 203

原创 2016SDAU编程练习三1014

Problem N Problem Description我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。 Input输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0

2016-05-17 19:43:15 207

原创 2016SDAU编程练习三1013

Problem M Problem Description有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛? Input输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0n=0表示输入数据的结束,不做处理。 Output对于每个测试实例,输出在第n

2016-05-17 19:41:46 182

原创 2016SDAU编程练习三1012

Problem L Problem Description在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数.例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: Input输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0 Output对于每个测试实例,请输出铺

2016-05-17 19:40:08 181

原创 2016SDAU编程练习三1011

Problem K Problem Description有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。其中,蜂房的结构如下所示。 Input输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0 Output对于每个测试实例,请输出蜜蜂从蜂房a

2016-05-17 19:37:11 336

原创 2016SDAU编程练习三1010

Problem J Problem Description有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1 Output对于每个测试实例,请输出不同走法的数量 Sample Input

2016-05-17 19:34:09 186

原创 2016SDAU编程练习三1006

Problem F Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1

2016-05-17 19:31:29 263

原创 2016SDAU编程练习三1002

Problem B Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequence

2016-05-17 19:28:27 293

原创 2016SDAU编程练习三1001

Problem A Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence

2016-05-15 21:29:14 195

原创 2016SDAU编程练习二1025

Sequence two Problem DescriptionSearch is important in the acm algorithm. When you want to solve a problem by using the search method, try to cut is very important.Now give you a number sequen

2016-04-23 15:19:46 200

原创 2016SDAU编程练习二1024

Sequence one Problem DescriptionSearch is important in the acm algorithm. When you want to solve a problem by using the search method, try to cut is very important.Now give you a number sequen

2016-04-23 15:15:58 194

原创 2016SDAU编程练习二1020

Prime Ring Problem Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent ci

2016-04-23 15:11:46 189

原创 2016SDAU编程练习二1018

Tempter of the Bone Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could

2016-04-23 15:09:28 292

原创 2016SDAU编程练习二1016

Red and Black Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move t

2016-04-23 15:05:58 251

原创 2016SDAU编程练习二1015

Knight Moves Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square o

2016-04-23 15:02:16 322

原创 2016SDAU编程练习二1012

Rescue Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in th

2016-04-23 14:57:10 306

原创 2016SDAU编程练习二1011

Oil Deposits Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a ti

2016-04-23 14:50:08 229

原创 2016SDAU编程练习二1010

Catch him Problem Description在美式足球中,四分卫负责指挥整只球队的进攻战术和跑位,以及给接球员传球的任务。四分卫是一只球队进攻组最重要的球员,而且一般身体都相对比较弱小,所以通常球队会安排5-7名大汉来保护他,其中站在四分卫前方、排成一线的5名球员称为进攻锋线,他们通常都是135公斤左右的壮汉。对防守方来说,攻击对手的四分卫当然是最直接的限制对手进攻的

2016-04-23 14:46:17 272

原创 2016SDAU编程练习二1019

N皇后问题 Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output共有

2016-04-16 14:23:20 149

原创 2016SDAU编程练习二1017

非常可乐 Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间

2016-04-16 14:21:47 221

原创 2016SDAU编程练习二1014

跟1013一样

2016-04-16 14:20:28 263

原创 2016SDAU编程练习二1013

A strange lift Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two b

2016-04-16 14:17:49 203

原创 2016SDAU编程练习二1009

连连看 Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已

2016-04-16 14:15:59 168

原创 2016SDAU编程练习二1008

猜数字 A有1数m,B来猜.B每猜一次,A就说太大t太小或;对了问B猜n次可以猜到的最大数。 Input第1行是整数T,表示有T组数据,下面有T行 每行一个整数n (1 ≤ n ≤ 30)  Output猜n次可以猜到的最大数 Sample Input213 Sample Output17 Author

2016-04-16 14:14:01 207

原创 2016SDAU编程练习二1007

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 hon

2016-04-16 14:07:03 214

原创 2016SDAU编程练习二1006

Line belt Problem DescriptionIn a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww's speed on AB is P and on CD is Q, he can move with the speed R on ot

2016-04-16 14:02:37 177

原创 2016SDAU编程练习二1005

Turn the corner Problem DescriptionMr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in has a width x, the street

2016-04-16 13:50:31 320

原创 2016SDAU编程练习二1004

Toxophily Problem DescriptionThe recreation center of WHU ACM Team has indoor billiards, Ping Pang, chess and bridge, toxophily, deluxe ballrooms KTV rooms, fishing, climbing, and so on.We all

2016-04-16 13:46:30 290

原创 2016SDAU编程练习二1003

Pie Problem DescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are co

2016-04-16 13:41:24 206

原创 2016SDAU编程练习二1002

Strange fuction Problem DescriptionNow, here is a fuction:  F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and 100. 

2016-04-16 13:37:24 235

空空如也

空空如也

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

TA关注的人

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