编写题解 1096: Minesweeper(很好理解) 摘要: #include #include//用于memset初始化函数 //这个函数不怕麻烦的应该都能写出来,不多解释了 void count(char a[][100],i…… 题解列表 2025年08月08日 3 点赞 0 评论 318 浏览 评分:0.0
一个简便的排雷方法 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;intmain(){intm,n;intnumber=1;while(cin>>m>>n){if(m==0&&n==0)return0;vector 题解列表 2025年03月02日 1 点赞 0 评论 479 浏览 评分:10.0 编写题解 1096:一眼丁真的扫雷 摘要:#include<stdio.h> int x(char s[][100],int i,int j,int n,int m); int main(){ int n,m,c=0,k[100][1…… 题解列表 2024年11月09日 0 点赞 0 评论 557 浏览 评分:0.0 我的思路找*号周围加一(*号不加) ```cpp#includeusingnamespacestd;charjia(chara){if(a!='*'){a++;}returna;}intmain(){intm,n,k=0;while(cin>>m>>n){if(m==0&&n==0){break;}chara[m+2][n+2];//阵 题解列表 2024年06月22日 0 点赞 0 评论 605 浏览 评分:0.0 扫雷游戏Minesweeper 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> using namespace std; con…… 题解列表 2024年06月20日 0 点赞 0 评论 450 浏览 评分:0.0 1096扫雷(构建两个数组,for循环遍历实现) 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;intmain(){intm,n;intk=1;//后面输出第几组数据用的while((cin>>m>>n)){if(m==0&&n==0)//跳出循环break;chars[100][100];//存地 题解列表 2024年05月31日 0 点赞 0 评论 509 浏览 评分:0.0 利用数组求解Minesweeper 摘要:解题思路:此题可用两个二维数组解决,一个char类型,一个int类型char用于接收用户输入的 .和*;在接收时即可给第二个int类型数组赋值,当char中接收的是.时,在int中的对应位置输入0,…… 题解列表 2024年03月08日 0 点赞 0 评论 585 浏览 评分:0.0 扩大二维数组模拟解决 用M+2\*N+2规模的数组去容纳M\*N的field容易解决访问越界问题每检测到一个地雷,就把地雷周围的数字+1```importjava.util.Arrays;importjava.util.Scanner;publicclassMain{staticintM;staticintN;static 题解列表 2024年03月04日 0 点赞 0 评论 579 浏览 评分:9.9 将棋盘扩大一圈 摘要:解题思路:将棋盘扩大一圈,扩大的一圈都为“.”,对棋盘上每个位置进行遍历,对棋子的八个方向进行判断是否有雷注意事项:参考代码:N=0while True: N=N+1 n,m=map(in…… 题解列表 2024年01月23日 0 点赞 0 评论 553 浏览 评分:9.9 编写题解 1096: Minesweeper--C语言二维数组模拟地雷详解 `解题思路:`-使用二维字符数组存储地雷信息,`*`表示有地雷,`.`表示安全。-确定了行列数后,声明两个二位数组(分别用于存储地雷信息和地雷数量),且在原来的行列数上增加两行两列,确保计算地雷周围数量时不越界。-读取二位字符数组,将地雷信息转换为二维数组, 题解列表 2023年12月16日 0 点赞 0 评论 897 浏览 评分:9.9 « 12345678...1314 »
编写题解 1096:一眼丁真的扫雷 摘要:#include<stdio.h> int x(char s[][100],int i,int j,int n,int m); int main(){ int n,m,c=0,k[100][1…… 题解列表 2024年11月09日 0 点赞 0 评论 557 浏览 评分:0.0
我的思路找*号周围加一(*号不加) ```cpp#includeusingnamespacestd;charjia(chara){if(a!='*'){a++;}returna;}intmain(){intm,n,k=0;while(cin>>m>>n){if(m==0&&n==0){break;}chara[m+2][n+2];//阵 题解列表 2024年06月22日 0 点赞 0 评论 605 浏览 评分:0.0
扫雷游戏Minesweeper 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> using namespace std; con…… 题解列表 2024年06月20日 0 点赞 0 评论 450 浏览 评分:0.0
1096扫雷(构建两个数组,for循环遍历实现) 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;intmain(){intm,n;intk=1;//后面输出第几组数据用的while((cin>>m>>n)){if(m==0&&n==0)//跳出循环break;chars[100][100];//存地 题解列表 2024年05月31日 0 点赞 0 评论 509 浏览 评分:0.0
利用数组求解Minesweeper 摘要:解题思路:此题可用两个二维数组解决,一个char类型,一个int类型char用于接收用户输入的 .和*;在接收时即可给第二个int类型数组赋值,当char中接收的是.时,在int中的对应位置输入0,…… 题解列表 2024年03月08日 0 点赞 0 评论 585 浏览 评分:0.0
扩大二维数组模拟解决 用M+2\*N+2规模的数组去容纳M\*N的field容易解决访问越界问题每检测到一个地雷,就把地雷周围的数字+1```importjava.util.Arrays;importjava.util.Scanner;publicclassMain{staticintM;staticintN;static 题解列表 2024年03月04日 0 点赞 0 评论 579 浏览 评分:9.9
将棋盘扩大一圈 摘要:解题思路:将棋盘扩大一圈,扩大的一圈都为“.”,对棋盘上每个位置进行遍历,对棋子的八个方向进行判断是否有雷注意事项:参考代码:N=0while True: N=N+1 n,m=map(in…… 题解列表 2024年01月23日 0 点赞 0 评论 553 浏览 评分:9.9
编写题解 1096: Minesweeper--C语言二维数组模拟地雷详解 `解题思路:`-使用二维字符数组存储地雷信息,`*`表示有地雷,`.`表示安全。-确定了行列数后,声明两个二位数组(分别用于存储地雷信息和地雷数量),且在原来的行列数上增加两行两列,确保计算地雷周围数量时不越界。-读取二位字符数组,将地雷信息转换为二维数组, 题解列表 2023年12月16日 0 点赞 0 评论 897 浏览 评分:9.9