Advertisement
Josif_tepe

Untitled

Mar 24th, 2021
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include <iostream>
  2. #include <queue>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     vector<pair<int, int> > v;
  9.    
  10.     int n;
  11. int m;
  12. int barok;
  13. queue<vector<pair<int, int> > >q;
  14.  
  15. cin>>n>>m;
  16. cin>>barok;
  17. int P=n*m;
  18.  
  19. int meseci=0;
  20. char matrica[n][m];
  21. bool visited[n][m];
  22.  
  23. for(int x=0; x<n; x++){
  24.     for(int x1=0; x1<m; x1++){
  25.        visited[x][x1]=false;
  26.     }
  27. }
  28.    
  29. int b;
  30. cin>>b;
  31.  
  32. for(int p1=0; p1<b; p1++){
  33.     int r;
  34.     int c;
  35.     cin>>r;
  36.     cin>>c;
  37.     r -= 1;
  38.     c -= 1;
  39.  
  40.     v.push_back(make_pair(r, c));
  41. }
  42.     for(int i  =0; i < v.size(); i++) {
  43.         cout << v[i].first << " " << v[i].second << endl;
  44.     }
  45.         return 0;
  46.     }
  47. /*
  48. ?X??
  49. XX??
  50. XX??
  51.  
  52.  **/
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement