Advertisement
egormerk

Ебучая полоска

Apr 13th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int N, kl = 0, h, w, b[100][100], v = 0, q = 0;
  9.     cin >> h >> w;
  10.     char a[100][100];
  11.     for (int i = 0; i < h; i++) {
  12.         for (int k = 0; k < w; k++) {
  13.             cin >> a[i][k];
  14.             if (a[i][k] == '#') {
  15.                     b[i][v] = k;
  16.                     v++;
  17.             }
  18.         }
  19.         v = 0;
  20.     }
  21.     for (int i = 0; i < h; i++) {
  22.         for (int k = 0; k < w; k++) {
  23.             cout << b[i][k];
  24.         }
  25.         cout << endl;
  26.     }
  27.     //cout << endl << kl;
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement