daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main()
  2. {
  3.     int n;
  4.     std::cin >> n;
  5.     std::vector<std::vector<int>> g(n);
  6.     for (int i = 0; i < n - 1; ++i)
  7.     {
  8.         int u, v;
  9.         std::cin >> u >> v;
  10.         g[u].push_back(v);
  11.         g[v].push_back(u);
  12.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand