# Bot Saves Princess

See the original problem on HackerRank.

## Solutions

Here is a possible C++ solution:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38  void displayPathtoPrincess(const vector& grid) { // find mario and peach pair mario, peach; for (auto i=0; i{}, minus{}); move(deltaX, "DOWN", less{}, plus{}); move(deltaY, "LEFT", greater{}, minus{}); move(deltaY, "RIGHT", less{}, plus{}); } int main(void) { int m; cin >> m; vector grid(m); copy_n(istream_iterator(cin), m, begin(grid)); displayPathtoPrincess(grid); } 
We've worked on this challenge in these gyms: modena