Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1.     while (!q.empty() and need != 0) {
  2.         int v = q.begin()->second;
  3.         q.erase(q.begin());
  4.         for (size_t j=0; j<input[v].friends.size(); ++j) {
  5.             q.insert(make_pair(input[input[v].friends[j]].arrival, input[v].friends[j]));
  6.             maximum = min(maximum, input[input[v].friends[j]].arrival);
  7.             cout << input[v].friends[j] << endl;
  8.             need-=1;
  9.             if (need == 0) break;
  10.         }
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement