stash's blog

By stash, history, 18 months ago, In English

Problem — Minimum Ugliness Appeared in the Wednesday contest on CodeChef.

My Solution — https://www.codechef.com/viewsolution/96660756

Approach (Using Binary Uplifting) →

  • (Precomputing) Binary Uplifting using DFS.
  • For Each query, identifying one endpoint of the longest diameter from given set
  • Calculating distance using LCM from above node to all nodes present in set, answer is (maximum distance / 2).

To Calculate Endpoint

  • Fix an arbitrary vertex let it be x.
  • Find the furthest vertex from x, let it be req_node.
  • req_node is Endpoint.

It is failing on 4/8 testcases.

Concept Used:

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By stash, history, 22 months ago, In English

The CodeHive Coding Competition was organized by the Newton School Coding Club at PCCOE on the HackerRank platform. The contest was designed to start with very basic concepts and gradually increase in difficulty.

The whole contest can be accessed via the following link: CodeHive Contest

For all participants, the links to the questions and their respective editorials are provided below:

  1. Explore Pandora: Problem Link
  2. Survival Match: Problem Link
  3. Bitwise Education: Problem Link
  4. Dragon Race: Problem Link
  5. Alien Mass Communication: Problem Link
  6. Max Avatar Time: Problem Link
  7. Na'vi Arrow: Problem Link
  8. Distributing Fruits: Problem Link

We kindly ask all participants to take some time to review all of the questions and editorials and provide their feedback and opinions.
Your insights and suggestions will help us to make improvements and ensure that future CodeHive Coding Competitions are even more engaging and challenging.

Checkout Out Future Events on https://nsccpccoe.web.app/

Thank you for your support and participation!

Best regards,
Newton School Coding Club,
Pimpri Chinchwad College of Engineering

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it