We have a 2D grid. Each cell is either a wall, an enemy or empty.

For example (0-empty, X-enemy, Y-wall):

0 X 0 0
X 0 Y X
0 X 0 0
You have one bomb and you want to kill as many as possible enemies with it. The bomb will kill all the enemies in the same row and column from the planted point until it hits the wall since the wall is too strong to be destroyed.

Given such a grid, return the maximum enemies you can kill with one bomb.
Note that you can only put the bomb at empty cell.

In the example, if you put a bomb at (1,1) you will kill 3 enemies which is the best you can get. You can not kill the guy behind the wall at (1,3).

这个题实质是LeetCode上的 361. Bomb Enemy

CareerCup Questions List 职业杯题目列表

最新文章

  1. jQuery图片滚动插件
  2. [Voice communications] 让音乐响起来
  3. Java编程思想(Chapter2、4、6)
  4. css精灵动画
  5. 文件压缩与挤压ZIP
  6. Oozie和Azkaban的技术选型和对比
  7. C#获取本机IP搜集整理7种方法
  8. 使用Flexible 实现手淘H5 页面的终端适配学习
  9. Effective Java2读书笔记-对于所有对象都通用的方法(二)
  10. 输入输出函数 I/O函数之perror()
  11. 【Hololens】微软Hololens虚拟现实视频集
  12. c语言中的#ifdef和#ifndef
  13. 如何优雅的利用Windows服务来部署ASP.NET Core程序
  14. Java和C++的数组比较
  15. [angularjs] angularjs系列笔记(七)HTML DOM
  16. 【洛谷P2966】Cow Toll Paths
  17. IndexDB 操作util
  18. HDU_1142(最短路 + dfs)
  19. A Product Recall 产品召回
  20. fedora安装后的配置

热门文章

  1. navigator对象及属性(userAgent)(扩展)
  2. 【排序算法】冒泡排序(Bubble Sort)
  3. json与java bean对象转换
  4. ACWing P372 棋盘覆盖 题解
  5. jQuery相关方法10
  6. 51nod 1434
  7. ROS常用工具
  8. python中的关键字yield有什么作用?
  9. (转)SmartPing:一个服务器Ping值监测工具
  10. [TJOI2019]甲苯先生的字符串——矩阵乘法+递推