Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <vector>#include <queue>#include <limits.h>using namespace std;struct Spot {int row;int col;explicit Spot(int r = -1, int c = -1):row(r),col(c){}};int main(int argc, const char * argv[]) {// insert code here...int rowN, colN;cin>>rowN>>colN;vector<char>* map = new vector<char>[rowN];char aChar;int rowH = 0, colH = 0;for (int i = 0; i < rowN; i++) {for (int j = 0; j < colN; j++) {cin>>aChar;if ('H' == aChar) {rowH = i;colH = j;}map[i].push_back(aChar);}}