文件名称:bouble-tower
- 所属分类:
- 数学计算/工程计算
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2013-10-14
- 文件大小:
- 1.43mb
- 下载次数:
- 0次
- 提 供 者:
- ken***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
背景
从前,有一个古老的帝国有两个形状不同的塔分别在不同的两个城市里。这两个塔是用圆形的砖一块一块建成的。这些圆形砖的高度是一样的,其半径都是整数。很明显,尽管这两个塔形状不同,但造塔所使用的圆形砖却有很多是相同的。
过了很多年,一个国王命令他的建筑师们移除两个塔的部分砖以便使它们的形状完全一样,同时使两个塔的高度尽可能的高,并且新塔的砖瓦的排列顺序必须与原来的一样。国王认为这样的两个塔象征着这两个城市之间的和谐和平等,于是命名它们为双胞胎塔。
任务
现在,两千年以后,你可以来处理这样非常简单的问题:给你两个不同形状塔的描述,你只要算出能建成的新双塔的最多的砖瓦数。
输入
输入包括以下内容:第一行输入两个整数 N1 和 N2 (1 <= N1,N2 <= 100) 分别表示最初时两个塔的砖瓦数;第二行输入 N1 个正整数表示第一个塔砖瓦的半径(按从上到下的顺序排列);下面的一行输入 N2 个整数表示第二个塔砖瓦的半径(按从上到下的顺序排列)。
当输入的 N1 和 N2 为 0 时结束。
输出
输出建成的新双塔的最多的砖瓦数。-Background
There was once an ancient empire with two different shapes of the two towers at different cities . The two circular brick tower is built piece by piece . These circular brick height is the same, the radius are integers. Clearly, although both towers of different shapes , but making use of the circular tower there are many tiles are identical .
Over many years, a king ordered his architects to remove two brick towers in order to make them part of exactly the same shape , but the height of the two towers as high as possible , and the new order of brick tower must be the same as the original . Kings think this two tower symbolizes the harmony between the two cities and equality , so named them as twin towers.
Task
Now, two years later, you can come to deal with this very simple question : give you a descr iption of two towers of different shapes , as long as you can calculate the new towers built up brick number.
Enter
Inputs include the following: The first line of
从前,有一个古老的帝国有两个形状不同的塔分别在不同的两个城市里。这两个塔是用圆形的砖一块一块建成的。这些圆形砖的高度是一样的,其半径都是整数。很明显,尽管这两个塔形状不同,但造塔所使用的圆形砖却有很多是相同的。
过了很多年,一个国王命令他的建筑师们移除两个塔的部分砖以便使它们的形状完全一样,同时使两个塔的高度尽可能的高,并且新塔的砖瓦的排列顺序必须与原来的一样。国王认为这样的两个塔象征着这两个城市之间的和谐和平等,于是命名它们为双胞胎塔。
任务
现在,两千年以后,你可以来处理这样非常简单的问题:给你两个不同形状塔的描述,你只要算出能建成的新双塔的最多的砖瓦数。
输入
输入包括以下内容:第一行输入两个整数 N1 和 N2 (1 <= N1,N2 <= 100) 分别表示最初时两个塔的砖瓦数;第二行输入 N1 个正整数表示第一个塔砖瓦的半径(按从上到下的顺序排列);下面的一行输入 N2 个整数表示第二个塔砖瓦的半径(按从上到下的顺序排列)。
当输入的 N1 和 N2 为 0 时结束。
输出
输出建成的新双塔的最多的砖瓦数。-Background
There was once an ancient empire with two different shapes of the two towers at different cities . The two circular brick tower is built piece by piece . These circular brick height is the same, the radius are integers. Clearly, although both towers of different shapes , but making use of the circular tower there are many tiles are identical .
Over many years, a king ordered his architects to remove two brick towers in order to make them part of exactly the same shape , but the height of the two towers as high as possible , and the new order of brick tower must be the same as the original . Kings think this two tower symbolizes the harmony between the two cities and equality , so named them as twin towers.
Task
Now, two years later, you can come to deal with this very simple question : give you a descr iption of two towers of different shapes , as long as you can calculate the new towers built up brick number.
Enter
Inputs include the following: The first line of
(系统自动生成,下载前可以参看下载内容)
下载文件列表
28. 双塔问题\28. 双塔问题\28. 双塔问题.cpp
............\............\28. 双塔问题.vcxproj
............\............\28. 双塔问题.vcxproj.filters
............\............\Debug\28. 双塔问题.log
............\............\.....\28. 双塔问题.obj
............\............\.....\.............tlog\28. 双塔问题.lastbuildstate
............\............\.....\.................\CL.read.1.tlog
............\............\.....\.................\CL.write.1.tlog
............\............\.....\.................\link.read.1.tlog
............\............\.....\.................\link.write.1.tlog
............\............\.....\vc120.idb
............\............\.....\vc120.pdb
............\28. 双塔问题.sdf
............\28. 双塔问题.sln
............\28. 双塔问题.v12.suo
............\Debug\28. 双塔问题.exe
............\.....\28. 双塔问题.ilk
............\.....\28. 双塔问题.pdb
............\28. 双塔问题\Debug\28. 双塔问题.tlog
............\............\Debug
............\28. 双塔问题
............\Debug
28. 双塔问题