Minesweeper has a wierd name don’t you think you don’t actually sweep any mines in it so I decided to make it better.

nc chals.bitskrieg.in 7006

dipper

A m×nm\times n board yields a system of linear equations in mnmn variables. Each variable aija_{ij} represents the number of mines at row ii, column jj. Each equation sets a constraint on how many mines can be at a location’s neighbors based on the number in its tile. For example, if there are b23b_{23} mines adjacent to a non-edge tile at row 22, column 33, the correpsonding equation is a13+a22+a33+a24=b23a_{13} + a_{22} + a_{33} + a_{24} = b_{23}.

Normally, such systems are solved using Gaussian elimination in O((mn)3)O((mn)^3). Luckily, our system of equations is very sparse, so scipy.sparse can solve the system more quickly.

Flag: BITSCTF{D0_u_y34rn_f0R_th3_m1n3s?}

The final solve script can be found here.