自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Find 7 Faster Than John Von Neumann

描述:It was said that when testing the first computer designed by von Neumann, people gave the following problem to both the legendary professor and the new computer: If the 4th digit of 2^n is 7, wha

2017-12-03 18:21:38 337

原创 Legal or Not

描述:ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like HH, hh, AC, ZT, lcc, BF, Qinz and so on chat

2017-12-03 18:04:19 311

原创 More is better

描述:Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.Mr Wang selected

2017-12-03 17:43:35 320

原创 Intercommunication System

描述:2010年是xx国一个多灾多难的一年,灾难使该国的通讯系统遭到了重创,全国共有n个通讯站点,分别从0到n-1进行编号,通讯部门对每两个站点的线路进行了检测,现在要你确定有哪些站点是彼此连通的。输入:输入数据有多组,每组数据的第一行包含两个整数n和m,其中n为通讯站点个数,接下来有m行,每一行有2个整数a和b,表示站点a和b通讯正常。其中1输入以EOF结束。

2017-12-03 17:24:34 396

原创 元素个数排序

描述:给定若干行,每行若干个整数,请根据每行整数个数从小到大进行排序。输入:输入数据有若干行(不超过10行),处理到文件结尾(EOF结束)。每行若干个(至少1个,不超过20个)整数,整数之间由空格分隔,结尾没有空格。每行字符串长度不超过50。输出:输出排序后的若干行(与输入行数相同),每行的格式与输入数据一致。样例输入:1 2

2017-11-28 22:19:20 1027

原创 小希的迷宫

描述:上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮

2017-11-28 22:07:28 245

原创 Crashing Robots

描述:In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other. Of course, all wareh

2017-11-10 17:35:37 306

原创 Scramble Sort

描述:In this problem you will be given a series of lists containing both words and numbers. The goal is to sort these lists in such a way that all words are in alphabetical order and all numbers are

2017-11-10 11:44:08 328

原创 Mine Sweeper

描述:The game Minesweeper is played on an n by n grid. In this grid are hidden m mines, each at a distinct grid location. The player repeatedly touches grid positions. If a position with a mine is

2017-11-10 11:05:24 1055

原创 求最大公约数和最小公倍数的常用解法

对于m,n两数求最大公约数的算法:(1)辗转相除法1.c=m%n。2.若c=0,则n就是两数的最大公约数。3.若c!=0,则m=n,n=c然后重新执行1。代码实现过程如下:#includeint sove(int x,int y){ return x%y==0?y:sove(y,x%y);}int main(){ int m,n,c; scanf("%d %

2017-10-20 16:22:48 1259

原创 Surround the Trees(凸包)

描述:There are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minimal required length of the rope. However, he does not know h

2017-08-19 14:31:42 376

原创 马拉松比赛(深搜)

描述:有一块矩形的海域,其中有陆地也有海洋,这块海域是CSUFT_ACM集训队的训练基地,这一天,昌神说要集训队的队员不能总是训练,于是昌神提出了中南林ACM集训队第一场环陆马拉松比赛,顾名思义就是围绕着陆地的边缘跑步。现在昌神给你出了个问题:这个比赛最多需要跑多少距离。 注意,这块海域上可能有多块陆地,比赛的场地可能设在任何一块陆地上。 输入:多组

2017-08-18 16:44:56 445

原创 字符识别(字符串处理)

描述:中南林业科技大学计算机与信息工程学院某位老师开发一个字符识别程序. 这个程序用来将纸质文档转换为电子版. 很显然, 这个转换过程不能保证100%正确, 其中有些字符不能识别. 你的任务是写一个程序帮助这位老师计算识别的效率. 识别的效率用公式R/A进行计算,其中R表示被成功识别的字符总数, A表示识别的字符总数. 行尾字符(即换行符)不作为字符看待。 输入:输入包含几

2017-08-18 15:13:13 2318

原创 判断多边形凹凸(计算几何基础)

描述:任意给定一个多边形,判断它是凸还是凹。多边形的顶点以逆时针方向的序列来表示。输入:输入包含多组测试数据,每组数据占2行,首先一行是一个整数n,表示多边形顶点的个数,然后一行是2×n个整数,表示逆时针顺序的n个顶点的坐标(xi,yi),n为0的时候结束输入。输出:对于每个测试实例,如果地块的形状为凸多边形,请输出“convex”,否则输出”conca

2017-08-18 14:06:26 3560

原创 In-circles Again(计算几何基础)

描述:In the figure below you can see triangle ABC and its in-circle (Circle that touches all the sides of a triangle internally). The radius of this in circle is r. Three other circles are drawn

2017-08-17 16:45:56 383

原创 Area in Triangle(计算几何基础)

描述:Given a triangle field and a rope of a certain length (Figure-1), you are required to use the rope to enclose a region within the field and make the region as large as possible.输入:The

2017-08-17 12:06:32 471

原创 Graph’s Cycle Component

描述:In graph theory, a cycle graph is an undirected graph that consists of a single cycle, or in other words, some number of vertices connected in a closed chain.Now, you are given a graph where so

2017-08-16 16:40:29 725

原创 A Walk Through the Forest(最短路径+深搜)

描述:Jimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to walk home. To make things even nicer, his office

2017-08-16 14:19:13 1561

原创 URL(字符串)

描述:WHU ACM Team is working on a brand new web browser named "Whu-Super-Browser". You're in response for a powerful feature: recording the previous addresses. Moreover, when a string is inputted, the

2017-08-15 17:32:11 1330

原创 Monthly Expense(二分)

描述:Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ moneyi ≤ 10,

2017-08-15 17:15:46 280

原创 Constructing Roads(最短路径)

描述: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 connected, if and only

2017-08-15 16:45:25 450

原创 节能(区间DP)

描述:Dr.Kong设计的机器人卡多越来越聪明。最近市政公司交给卡多一项任务,每天早晨5:00开始,它负责关掉ZK大道右侧上所有的路灯。卡多每到早晨5:00准会在ZK大道上某盏路灯的旁边,然后他开始关灯。每盏灯都有一定的功率,机器人卡多有着自觉的节能意识,它希望在关灯期间,ZK大道右侧上所有路灯的耗电量总数是最少的。机器人卡多以1m/s的速度行走。假设关灯动作不需要

2017-08-15 13:15:37 328

原创 Friend(并查集)

描述:There are some people traveling together. Some of them are friends. The friend relation is transitive, that is, if A and B are friends, B and C are friends, then A and C will become friends too.T

2017-08-14 17:25:39 493

原创 畅通工程(并查集)

描述:某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?输入:测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( 注意:两个城市之间可以有多条道路相通,也

2017-08-14 16:08:57 302

原创 Bitmap

描述:Bitmap is a compression technology for redundant data compression. The ratio of Bitmap Compression is the size of compressed data divides by the size of original data. The following is an e

2017-08-14 15:23:00 322

原创 Tempter of the Bone(深度搜索)

描述:The 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 feel the ground sinking. He realized that the

2017-08-14 13:34:55 395

原创 Minesweeper(深搜)

描述:Minesweeper is a game available with the Windows™ operating system. The object of Minesweeper is to locate all the mines as quickly as possible without uncovering any of them. You can uncov

2017-08-14 11:53:39 464

原创 Frogger

DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full o

2017-08-13 15:35:36 375

原创 Robberies(01背包的概率问题)

描述:The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided to work in th

2017-08-13 13:19:39 646 1

原创 Human Gene Functions(动态规划)

描述:It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been interested in id

2017-08-13 12:09:55 670

原创 Page Count

描述:When you execute a word processor's print command, you are normally prompted to specify the pages you want printed. You might, for example, enter:10-15,25-28,8-4,13-20,9,8-8The expression

2017-08-12 15:09:47 631

空空如也

空空如也

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

TA关注的人

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