We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Graph Theory
  4. Roads and Libraries
  5. Discussions

Roads and Libraries

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • salimova_dina987
    7 months ago+ 2 comments

    Hi everybody, can somebody explain why testcase q = 1, n = 5, m = 3, c_lib = 6, c_road = 1, [[1 2], [1 3], [1 4]] has answer 15. I thought should be 9 (because we have 3 road and 1 library). And also the question: why n = 5???? it should be 4 (cities = [1,2,3,4]).

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy