Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. #define inf cin //for testing
  4. #define outf cout
  5.  
  6. using namespace std;
  7. vector<string> pict;
  8.  
  9. int main()
  10. {
  11.     //ifstream inf("maze1.in");
  12.     //ofstream outf("maze1.out");
  13.     //cout << setprecision(10);
  14.    
  15.     int w, h;
  16.     inf >> w >> h;
  17.    
  18.     string take;
  19.     getline(inf, take); //move down a line, >> operator does not take in \n after two numbers
  20.    
  21.    
  22.     string ch;
  23.    
  24.     for (int i = 0; i < 2*h+1; i++)
  25.     {
  26.         getline(inf, ch);
  27.         pict.push_back(ch);
  28.        
  29.     }
  30.    
  31.  
  32.     //Will never print on 25x25 maze
  33.  
  34.     for (int i = 0; i < 2*h+1; i++)
  35.     {
  36.         outf << pict[i] << endl;
  37.     }
  38.  
  39.     return 0;
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement