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