题解 1096: Minesweeper

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

将棋盘扩大一圈

摘要:解题思路:将棋盘扩大一圈,扩大的一圈都为“.”,对棋盘上每个位置进行遍历,对棋子的八个方向进行判断是否有雷注意事项:参考代码:N=0while True:    N=N+1    n,m=map(in……

扩大二维数组模拟解决

用M+2\*N+2规模的数组去容纳M\*N的field容易解决访问越界问题每检测到一个地雷,就把地雷周围的数字+1```importjava.util.Arrays;importjava.util.Scanner;publicclassMain{staticintM;staticintN;static

屎山代码写法

摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using names……

一个简便的排雷方法

解题思路:注意事项:参考代码:#include#includeusingnamespacestd;intmain(){intm,n;intnumber=1;while(cin>>m>>n){if(m==0&&n==0)return0;vector