Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Lee()
- {
- int i, j, iUrmator, jUrmator;
- park[l][c] = 1;
- coada.push(make_pair(l,c));
- while(!coada.empty())
- {
- i = coada.front().first;
- j = coada.front().second;
- coada.pop();
- for(int directie = 0; directie < 4; directie++)
- {
- iUrmator = i + di[directie];
- jUrmator = j + dj[directie];
- if( valid(iUrmator,jUrmator) && park[iUrmator][jUrmator] == 0 )
- {
- park[iUrmator][jUrmator] = park[i][j] + 1;
- coada.push(make_pair(iUrmator,jUrmator));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement