相当之简单粗暴 摘要:解题思路:注意事项:参考代码#includeusing namespace std;int main(){ int x,y,num=0; while(cin>>x>>y){ …… 题解列表 2022年03月10日 0 点赞 0 评论 556 浏览 评分:6.0
优质题解 1096: Minesweeper 摘要:解题思路:说是黄金矿工,其实是扫雷的逻辑。没有什么算法上的难点,花时间的地方在于输出的数组里既有'*'又有数字,而我定义的数组是int型,所以一开始的想法是用static_cast把有…… 题解列表 2022年03月11日 0 点赞 1 评论 927 浏览 评分:8.7
暴力法+轰炸与排雷 综合法 的 简化版 完成 Minesweeper 摘要:解题思路:给出2种解法,时间复杂度几乎一样,但空间复杂度约为一半的关系。注意事项:暴力法:1.int s[102][102] = {0}为通用写法,若使用c++14,可使用int s[x+2][y+2…… 题解列表 2022年04月06日 0 点赞 0 评论 981 浏览 评分:9.9
Minesweeper遍历 摘要:参考代码:#include<iostream> #include<cstring> using namespace std; int dx[8]={1,0,-1,0,1,1,-1,-1}; i…… 题解列表 2022年05月07日 0 点赞 0 评论 490 浏览 评分:0.0
1096: Minesweeper 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#define MAX 100 // 地图最大尺寸 using namespace std; char position[M…… 题解列表 2022年05月08日 0 点赞 0 评论 572 浏览 评分:0.0
c语言方法(常规) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>/* run this program using the console pauser or …… 题解列表 2022年05月30日 0 点赞 0 评论 502 浏览 评分:0.0
SinzoL--题解 1096: Minesweeper 摘要:####先翻译一下:给出N×M大小的一个字符数组,每个单元由"*"或"."组成,"*"代表地雷,你要做的就是计算每个不是雷的单元周围有几个雷,并按示例输出 ###下面是代码: ```cpp #i…… 题解列表 2022年06月29日 0 点赞 0 评论 543 浏览 评分:0.0
Minesweeper(留个记录) 摘要:解题思路:注意事项:字符输入—scanf(" %c")(空格可换成\n \t),单个字符读取,可忽略掉空格、换行参考代码:#include <stdio.h> //查找周围雷的数量 int min…… 题解列表 2022年08月19日 0 点赞 0 评论 581 浏览 评分:9.9
1096: Minesweeper ```cpp#include#includeusingnamespacestd;constintmaxn=101;intn,m,x[maxn],y[maxn],vist[maxn][maxn];charmap[maxn][maxn];voidcheck(intdx, 题解列表 2022年08月31日 0 点赞 0 评论 595 浏览 评分:9.9
python解题,清晰易懂 解题思路:如何对周围元素进行遍历,寻找炸弹的个数是个关键的问题。因此,我们将每个字符存入一个二维数组中,方便我们进行遍历。注意事项:输出是个重点,我在输出上犯了好几次错误,注意输出的格式!参考代码:defcount(i,j,arr):#定义一个函数, 题解列表 2022年10月01日 0 点赞 0 评论 583 浏览 评分:0.0