| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 776 人关注过本帖
标题:关于WarCraft III 的一道编程题,我纠结半天下不了手,求高手给力
取消只看楼主 加入收藏
菜鸟X编程
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-12-25
结帖率:0
收藏
已结贴  问题点数:15 回复次数:2 
关于WarCraft III 的一道编程题,我纠结半天下不了手,求高手给力
作为一个war3狂热爱好者,望高手给力,给出简答。但求快点。Description        One day, pfctgeorge was very bored. He looked around his room, and noticed that there were a lot of 1*1*1 cubic meter(m^3) plastic white cubes. Then, he decided to stack these cubes into a 3-Dimension object.


       We assume that pfctgeorge's room is a 3-Dimensional space. Pfctgeorge stacked every cube located in (x0,y0), that is, the cube was above of those cubes whose coordinate of X is x0 and coordinate of Y is y0 before stacking this cube, and its edge is perpendicular to X-axis,Y-axis of Z-axis respectively.


       After stacking all the cubes into the object. Pfctgeorge noticed that there was a pail of colorful paint. So he wanted to painted the object into colorful. However, of course, he can only paint the surface of the object.


       Help pfctgeorge to figure out the colorful area of the object in square meter(m^2) after his painting

Input The first line of the input contains an integer T(1<=T<=20) which means the number of test cases.
Then T test cases follow, for every test case, the first line contains two integer m,n(1<=m,n<=10), means the pfctgeorge's room is m meters in width and n meters in length. Then m lines follow, every line contains n integers in the range of 0..100. If j-th number of i-th line is k, it means there are k cubes located in (i,j).

 


Output For each test case, you should output one line. First, output"Case #C: ", C means the number of the test case which is from 1 to T. Then, output an integer indicates the colorful area of the object in square meter after pfctgeorge's painting
搜索更多相关主题的帖子: decided noticed plastic around white 
2010-12-25 14:18
菜鸟X编程
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-12-25
收藏
得分:0 
回复 2楼 zhaoya881010
天王能给力乎?
2010-12-25 14:23
菜鸟X编程
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2010-12-25
收藏
得分:0 
题目的汉语描述是;;;;
玩家是一个疯狂的Elfness著名的游戏,魔兽争霸III . 他不但戏独奏也就是。
  
  现在,一种想法进入他的头脑,他想踢使用24英雄就是在单人而不是101英雄就是原始为了赢得比赛,Elfness要选择5英雄,这样他就能得到一种最有力的战斗队形。
  
  我们都知道,每个英雄这些24英雄有一个基本能力值,因为有些关系,还有能力之间的价值每两个英雄。
这些复杂的规则,Elfness认为这是很难选择自己的最好的数组,所以他问你:一名优秀的程序员,帮助他编写一个程序,选择5英雄
2010-12-25 14:37
快速回复:关于WarCraft III 的一道编程题,我纠结半天下不了手,求高手给力
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011717 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved