Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. // Custom types
  7. typedef unsigned int ui;
  8. typedef vector<int> vi;
  9. typedef vector<unsigned int> vui;
  10. typedef vector<vector<int>> vvi;
  11. typedef vector<vector<unsigned int>> vvui;
  12.  
  13. // Macros
  14. #define ALL(v) (v).begin(), (v).end()
  15.  
  16. // Constants
  17. const ui N = 1000;
  18. const ui M = 1000;
  19.  
  20. // Globals
  21. bool picture[N][M];
  22.  
  23. int main() {
  24.     ui n, m;
  25.     cin >> n >> m;
  26.  
  27.     for (ui i = 0; i < n; i++)
  28.         for (ui j = 0; j < m; j++) {
  29.             char temp;
  30.             cin >> temp;
  31.  
  32.             picture[i][j] = temp == '#';
  33.         }
  34.  
  35.     for (ui i = 0; i < n; i++)
  36.         for (ui j = 0; j < m; j++)
  37.             cout << picture[i][j];
  38.  
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement