Josif_tepe

Untitled

Sep 10th, 2025
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.06 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <queue>
  4. using namespace std;
  5. const int maxn = 1005;
  6. int n, m;
  7. char mat[maxn][maxn];
  8.  
  9.  
  10. bool can_move_left(vector<pair<int, int>> piano) {
  11.     for(pair<int, int> p: piano) {
  12.         int ti = p.first + di[i];
  13.         int tj = p.second + dj[i];
  14.        
  15.        
  16.     }
  17. }
  18. int main() {
  19.     ios_base::sync_with_stdio(false);
  20.    
  21.     cin >> n >> m;
  22.    
  23.     int f = 0;
  24.     int width = 0;
  25.     for(int i = 0; i < n; i++) {
  26.         int w = 0;
  27.         for(int j = 0; j < m; j++) {
  28.             cin >> mat[i][j];
  29.            
  30.             if(mat[i][j] == 'F') {
  31.                 f++;
  32.                 w++;
  33.             }
  34.            
  35.         }
  36.         width = max(width, w);
  37.     }
  38.    
  39.     int height = f / width;
  40.     vector<pair<int, int>> piano;
  41.    
  42.     int pi = 0;
  43.     int pj = 0;
  44.     for(int i = 0; i < n; i++) {
  45.        
  46.         for(int j =0 ; j < m; j++) {
  47.             if(mat[i][j] == '1') {
  48.                 piano.push_back({i, j});
  49.             }
  50.         }
  51.     }
  52.  
  53.    
  54.    
  55.      return 0;
  56. }
  57.  
Advertisement
Add Comment
Please, Sign In to add comment