Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <queue>
- using namespace std;
- int main() {
- int L, W;
- cin >> L >> W;
- int N;
- cin >> N;
- int b;
- cin >> b;
- vector<pair<int, int> > v;
- for(int i = 0; i < b; i++) {
- int a, c;
- cin >> a >> c;
- v.push_back(make_pair(a, c));
- }
- queue<vector<pair<int, int> > > q;
- q.push(v);
- int barokni = 0;
- while(!q.empty()) {
- vector<pair<int, int> > c = q.front();
- q.pop();
- barokni += c.size();
- if(barokni >= N) {
- break;
- }
- for(int k = 0; k < 4; k++) {
- int ti = c[k].first + di[k];
- int tj = c[k].second + dj[k];
- }
- }
- return 0;
- }
- /*
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement