自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Networking(Kruskal)

You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of p

2017-07-31 21:40:36 231

原创 Jungle Roads (Kruskal)

The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so

2017-07-31 21:27:27 239

原创 Swordfish (Kruskal)

We all remember that in the movie Swordfish, Gabriel broke into the World Bank Investors Group in West Los Angeles, to rob $9.5 billion. And he needed Stanley, the best hacker in the world, to help hi

2017-07-31 21:19:34 325

原创 QS Network(Kruskal)

In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each other via networks. If two QS want to get connected, they need to buy two network adapters

2017-07-31 18:50:31 599 1

原创 Protecting the Flowers (贪心)

Farmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his beautiful

2017-07-30 18:11:41 552

原创 可口可乐(BFS)

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

2017-07-30 16:45:07 535

原创 回形取数

题目描述输入输出样例输入3 31 2 34 5 67 8 9样例输出1 4 7 8 9 6 3 2 5代码#includeint num[250][250];int book[250][250];int n,m;int main(){ scanf("%d%d",&n,&m); int i,j;

2017-07-30 10:29:24 287

原创 蛇形填数

题目描述在n*n方阵里填入1,2,...,n*n,要求填成蛇形。例如n=4时方阵为:10 11 12 19 16 13 28 15 14 37 6 5 4输入直接输入方阵的维数,即n的值。(n输出输出结果是蛇形方阵。样例输入3样例输出7 8 16 9 25 4 3#includeint num[250][250];int book

2017-07-30 10:06:46 245

原创 Sudoku(DFS)

Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The othe

2017-07-29 12:01:02 822

原创 Find a way(BFS)

Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifenfei’s home is at the

2017-07-28 16:21:37 257

原创 Prime Path (BFS)

The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of

2017-07-28 11:39:44 2161

原创 Dungeon Master (BFS)

You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south

2017-07-28 09:42:23 301

转载 二叉树前序,中序,后序遍历详解

只要是搞计算机的,对数据结构中二叉树遍历都不陌生,但是如果用到的机会不多那么就会慢慢淡忘,温故而之新才是最好的学习方式,现在就重新温习一下这方面的知识。首先我想先改变这几个遍历的名字(前根序遍历,中根序遍历,后根序遍历);前中后本来就是相对于根结点来说的,少一个字会产生很多不必要的误解。  1. 前根序遍历:先遍历根结点,然后遍历左子树,最后遍历右子树。ABDHECFG2.

2017-07-27 13:51:51 16313

原创 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 bone

2017-07-27 08:51:30 319

原创 Ordering Tasks(拓扑排序)

John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed.InputThe input will consist of s

2017-07-26 12:04:56 369

原创 确定比赛名次

有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。Input输入有若干组,每组中的第一行为二个数N(1<=N<=500),M;其中N表示

2017-07-26 09:44:07 293

原创 EXCEL排序

Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。 Input 测试输入包含若干测试用例。每个测试用例的第1行包含两个整数 N (行,每行包含一条学生纪录。每条学生纪录由学号(6位数字,同组测试中没有重复的学号)、姓名(不超过8位且不包含空格的字符串)、成绩(闭区间0,100内的整数)组成,每个项目间用1个空格隔开。当读到 N=0 时,全部输入结束,相应的结果不要输

2017-07-25 17:24:49 472

原创 迷宫问题

定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。 Input 一个5 ×

2017-07-25 15:42:35 391

原创 Prime Ring Problem

A 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 circles should be a prime.Note: the number

2017-07-24 15:22:31 247

转载 并查集详解 (转)

这个文章是几年前水acm的时候转的, 当时也不知道作者是谁, 要是有人知道的话说一下吧并查集是我暑假从高手那里学到的一招,觉得真是太精妙的设计了。以前我无法解决的一类问题竟然可以用如此简单高效的方法搞定。不分享出来真是对不起party了。(party:我靠,关我嘛事啊?我跟你很熟么?)来看一个实例,杭电1232畅通工程首先在地图上给你若干个城镇,这些城镇都可以看作点,然后告

2017-07-24 08:36:00 188

原创 Restructuring Company

Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard and merge departments, fire employees and do other unpleasant stuff. Let

2017-07-23 21:17:24 390

原创 畅通工程

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

2017-07-23 09:18:42 203

原创 The Suspects

Severe 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 strategy is to s

2017-07-22 17:51:06 214

转载 Wireless Network

DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all compu

2017-07-22 14:52:23 353

原创 Stones

Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games this time.

2017-07-22 13:55:12 259

原创 Windows Message Queue

D - Windows Message Queue Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 2724DescriptionMessage queue is the basic fundamental of windows system.

2017-07-21 16:51:57 225

空空如也

空空如也

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

TA关注的人

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