Advertisement
Josif_tepe

Untitled

Apr 26th, 2021
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <queue>
  4. using namespace std;
  5. int main() {
  6.     int L, W;
  7.     cin >> L >> W;
  8.     int N;
  9.     cin >> N;
  10.     int b;
  11.     cin >> b;
  12.     vector<pair<int, int> > v;
  13.     for(int i = 0; i < b; i++) {
  14.         int a, c;
  15.         cin >> a >> c;
  16.         v.push_back(make_pair(a, c));
  17.     }
  18.     queue<vector<pair<int, int> > > q;
  19.     q.push(v);
  20.     int barokni = 0;
  21.     while(!q.empty()) {
  22.         vector<pair<int, int> > c = q.front();
  23.         q.pop();
  24.         barokni += c.size();
  25.         if(barokni >= N) {
  26.             break;
  27.         }
  28.         for(int k = 0; k < 4; k++) {
  29.             int ti = c[k].first + di[k];
  30.             int tj = c[k].second + dj[k];
  31.         }
  32.        
  33.     }
  34.     return 0;
  35. }
  36.  
  37. /*
  38.  
  39.  */
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement