Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- int N, kl = 0, h, w, b[100][100], v = 0, q = 0;
- cin >> h >> w;
- char a[100][100];
- for (int i = 0; i < h; i++) {
- for (int k = 0; k < w; k++) {
- cin >> a[i][k];
- if (a[i][k] == '#') {
- b[i][v] = k;
- v++;
- }
- }
- v = 0;
- }
- for (int i = 0; i < h; i++) {
- for (int k = 0; k < w; k++) {
- cout << b[i][k];
- }
- cout << endl;
- }
- //cout << endl << kl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement