mahesh_2002's blog

By mahesh_2002, history, 4 years ago, In English

Experience the Competitive Programming Competition, for all participants of all levels of expertise. This event ensures that even an absolute beginner is able to solve something. So Get your Hands Dirty.

Compete against other coders and solve the questions prepared by the geekiest coders of IIT Hyderabad.

Date and Time: March 14th, 1500-1800 IST
Contest Link: Hackerrank Proquest
Registration Form: Details Form

You will have five problems and three hours to solve them. The problems are a good mix for all difficulty levels, from grandmasters to pupils. We have some hard problems, and some very easy too, and everything in between.

The results and prizes will appear on the contest leaderboard.

It's open for all. We hope you'll enjoy the competition.

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Decent problems! Enjoyed solving them.

»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

I wasn't able to see this in time. If possible, can the contest announcements be added to the blog a little earlier. I would surely see try the problems but won't be able to participate :)

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Will there be an editorial?

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +14 Vote: I do not like it

    Long Year

    Store the number of days in each month in an array. Update february based on whether given year was leap or not. Check $$$1 \leq month \leq 12$$$ and date is valid for that month. Then it's just taking sum of number of days in months before current month, and the number of days in current month.

    Virus transmission

    Each person represent a circular region. Two regions overlap if distance between centres $$$\leq$$$ sum of radius of both circles. For each infected person, mark all persons as infected (in a boolean array) whose region intersects with any initially infected person.

    Clever Criminals

    We need number of houses visited odd number of times. House $$$x$$$ is visited only by $$$f(i)-1$$$ criminals (one less, since there's no thief stealing from consecutive houses, representing factor $$$1$$$), where $$$f(i)$$$ is the number of divisors. $$$M \geq N$$$ is important, since it means all divisors upto $$$N$$$ are tried.

    Hence, only houses visited even number of times are houses numbered with value $$$x$$$ where $$$x$$$ is a perfect square. This count can be counted naively in $$$O(\sqrt{N})$$$ and subtracted from $$$N-1$$$ House numbered $$$0$$$ is handled separately.

    Vaccine-Distribution

    Edges of graph forms connected components. All edges in a component get vaccination from the vertex providing vaccine at minimum cost within current component. It can be easily simulated using Disjoint Set Union.

    Vaccine Time

    Only when there are cyclic dependencies, that we need to merge them. Hence, for the given Directed dependency graph, build Strongly connected components, merge them. Resulting graph would be a DAG, run DP on this DAG to find minimum time at which ingredient at node x would be ready for all nodes $$$1 \leq x \leq N$$$ of original graph.

    Now we can sort these times and run binary search. It's easy to prove no dependency is ignored here.

    Let's Go Pawri !!

    This problem is classical TwoSAT where each type of condition represent one (or more) implications, and we need to check if TwoSAT can be satisfied.

    • condition 1 u v: !u => v, !v => u
    • condition 2 u v: u => !v, v => !u
    • condition 3 u v: u <=> v, !u <=> !v
    • condition 4 u v: !v => !u

    Read more on 2-SAT here

»
4 years ago, # |
  Vote: I like it +24 Vote: I do not like it

Are there any updates regarding winners and prize distribution?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    The Winners will be announced on our Instagram page this Friday. Elan & nVision Instagram

    The details for the prizes for winners will be emailed or collected via Whatsapp within Thursday. Thank you all for participating in our contest.