自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(50)
  • 资源 (1)
  • 收藏
  • 关注

原创 Hidden Number

题目描述Your job is to find out the secret number hidden in a matrix, each of whose element is a digit ('0'-'9') or a letter ('A'-'Z'). You can see an example matrix in Figure 1.  The hidden numbe

2015-08-27 17:48:25 327

原创 上升序列

题目描述我们有一个数列A1,A2...An,你现在要求修改数量最少的元素,使得这个数列严格递增(严格递增即相邻元素不存在相等的情况)。其中无论是修改前还是修改后,每个元素都必须是整数。 请输出最少需要修改多少个元素。输入第一行输入一个T(1≤T≤10)T (1 \leq T \leq 10)T(1≤T≤10),表示有多少组数据每一组数据:第一行输

2015-08-27 17:42:27 390

原创 最后一个1

题目描述对于一个十进制的数字x,将他转化为2进制,他的2进制将由0和1组成,求里面的最后一个1在第几位输入第一行输入T,代表T组数据,接下来T行,每行输入一个X。00输出输入x的2进制中最后一个1在第几位,不存在输出0样例输入3038样例输出021 #include #i

2015-08-27 17:23:40 233

原创 最小公倍数

#includeint main(){ int m,n,res,c,p; while(scanf("%d%d",&m,&n)!=EOF) { if(n<m) { c=n; n=m; m=c; } p=m*n; while(m!=0) { res=n%m; n=m; m=res; }

2015-08-27 16:44:35 295

原创 Avoid The Lakes

DescriptionFarmer John's farm was flooded in the most recent storm, a fact only aggravated by the information that his cows are deathly afraid of water. His insurance agency will only repay him,

2015-08-27 16:25:26 233

原创 Fence Repair

DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN (1 ≤ N ≤ 20,000) planks of wood, each having some integer le

2015-08-27 16:19:47 277

原创 The Suspects

DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best str

2015-08-27 16:14:42 221

原创 超级楼梯

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

2015-08-27 16:10:02 361

原创 Lotto

Problem Description In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase your chance of winning - is to selec

2015-08-27 15:45:58 215

原创 Seeding

It is spring time and farmers have to plant seeds in the field. Tom has a nice field, which is a rectangle with n * m squares. There are big stones in some of the squares.Tom has a seeding-machine

2015-08-27 15:41:28 243

原创 今年暑假不AC

Problem Description “今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7

2015-08-27 15:25:38 197

原创 寒冰王座

Problem Description 不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:"我要买道具!"地精商人:"我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水350块一个."死亡骑士:"好的,给我一个血瓶."说完他掏出那

2015-08-26 23:01:39 260

原创 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活

Problem Description 急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。月有阴

2015-08-26 20:21:37 378

原创 Bone Collector

Problem Description Many 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 went to the gra

2015-08-26 17:53:26 248

原创 老王赛马

题目描述赛马是一古老的游戏,早在公元前四世纪的中国,处在诸侯割据的状态,历史上称为“战国时期”。在魏国作官的孙膑,因为受到同僚庞涓的迫害,被齐国使臣救出后,到达齐国国都。 赛马是当时最受齐国贵族欢迎的娱乐项目。上至国王,下到大臣,常常以赛马取乐,并以重金赌输赢。田忌多次与国王及其他大臣赌输赢,屡赌屡输。一天他赛马又输了,回家后闷闷不乐。孙膑安慰他说:“下次有机会带我到马场看看,也许我能

2015-08-25 20:08:28 1225

原创 C hicken and rabbit s

题目描述Chicken and rabbits are in a same cage. As we all know, chicken has two legs but rabbit has four. Nowwe know the number of legs in the cage is A, please tell me how many animals may in the c

2015-08-25 19:51:57 324

原创 A-B

题目描述做惯了A+B的我们,要不要来点新鲜的?那么来个A-B吧?输入第一行输入一个N,代表有N组测试数据,接下来N行,每行输入两个整数A和B,注意是:整数、整数、整数,重要的话一定要说三遍!(题目保证A和B均在int型内!)输出输入N行,每行输入A-B的值!样例输入32 11 23 0样例输出1-1

2015-08-25 19:39:43 207

原创 Cube Stacking

DescriptionFarmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Betsy to p

2015-08-24 21:29:48 250

原创 Wormholes

DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination a

2015-08-24 11:24:18 183

原创 Friend

Problem DescriptionFriend number are defined recursively as follows.(1) numbers 1 and 2 are friend number;(2) if a and b are friend numbers, so is ab+a+b;(3) only the numbers defined in (1) an

2015-08-24 09:42:10 246

原创 Raising Modulo Numbers

DescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mathema

2015-08-24 09:15:39 168

原创 月之数

Problem Description当寒月还在读大一的时候,他在一本武林秘籍中(据后来考证,估计是计算机基础,狂汗-ing),发现了神奇的二进制数。如果一个正整数m表示成二进制,它的位数为n(不包含前导0),寒月称它为一个n二进制数。所有的n二进制数中,1的总个数被称为n对应的月之数。例如,3二进制数总共有4个,分别是4(100)、5(101)、6(110)、7(111),他们中

2015-08-23 22:12:54 512

原创 How Many Maos Does the Guanxi Worth

Problem Description"Guanxi" is a very important word in Chinese. It kind of means "relationship" or "contact". Guanxi can be based on friendship, but also can be built on money. So Chinese often s

2015-08-23 21:54:45 179

原创 seaside

Problem DescriptionXiaoY is living in a big city, there are N towns in it and some towns near the sea. All these towns are numbered from 0 to N-1 and XiaoY lives in the town numbered ’0’. There are

2015-08-23 21:39:51 253

原创 大数的加法

#include#include#define MAX_LEN 200//宏定义 char s1[MAX_LEN+10];//大数组要定义在 main函数之外 char s2[MAX_LEN+10];int a1[MAX_LEN+10];int a2[MAX_LEN+10];int main(){ scanf("%s",s1); scanf("%s",s2)

2015-08-23 21:26:02 215

原创 大数的乘法

#include//非负数乘法 #include#define MAX_LEN 200char s1[MAX_LEN+10];char s2[MAX_LEN+10];int a[MAX_LEN+10];int b[MAX_LEN+10];int c[MAX_LEN*2+10];int main(){ scanf("%s",s1); scanf("%s",

2015-08-23 21:23:35 219

原创 大数的阶乘

#include#include//它包含了清零函数! #define MAX 1000000//一般大数问题都要用到宏定义int a[MAX];//把大数组定义在main函数之外,否则不能输出结果 int main(){ int n;//n不是大数 ,运算结果是大数 //int a[MAX];//存数运算结果 while(scanf("%d",&n)!

2015-08-23 21:19:34 224

原创 最短路

Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input 输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=10000),N表示成都的大街上

2015-08-21 21:45:33 282

原创 Constructing Roads

Problem Description There 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 other. We say two village A and B are con

2015-08-20 20:39:37 160

原创 Catch That Cow

Problem Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at

2015-08-20 20:33:25 276

原创 Can you find it?

Problem Description Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+B

2015-08-20 20:28:04 220

原创 Cable master

Problem Description Inhabitants 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 ev

2015-08-20 20:23:33 218

原创 Bridging signals

Problem Description 'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the ch

2015-08-20 20:16:09 152

原创 Bridging signals

Problem Description 'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the ch

2015-08-20 20:03:34 168

原创 Advanced Fruits

Problem Description The company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from one fruit into the genome of another one. Most times this method do

2015-08-20 19:56:33 306

原创 矩形A + B

Problem Description 给你一个高为n ,宽为m列的网格,计算出这个网格中有多少个矩形,下图为高为2,宽为4的网格. Input 第一行输入一个t, 表示有t组数据,然后每行输入n,m,分别表示网格的高和宽 ( n  Output 每行输出网格中有多少个矩形. Sample Input 21 2

2015-08-20 19:47:32 319

原创 看病排队

Problem Description 看病要排队这个是地球人都知道的常识。不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别为1的优先权最低。医生在看病时,则会在他的队伍里面选择一个优先权最高

2015-08-20 19:42:10 313

原创 愚人节的礼物

Problem Description          四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚人指数,即最少需要拆多少个盒子才能拿到礼

2015-08-20 19:25:03 368

原创 畅通工程

Problem Description         省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Input        测试输入包含若干测试用例。每个测试用例的第1行给

2015-08-20 19:18:55 269

原创 The least one

Problem Description       In the RPG game “go back ice age”(I decide to develop the game after my undergraduate education), all heros have their own respected value, and the skill of killing monst

2015-08-20 19:11:57 141

QTP11破解方法及工具

QTP11破解方法及工具,没有软件,因为软件太大了,上传不了

2019-02-21

空空如也

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

TA关注的人

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