When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

dakshgarg's blog

By dakshgarg, history, 3 years ago, In English

Greetings Coders, We would like to invite all of you to the SpyBits CP Round 2021, under the banner of Udyam’21, IIT (BHU) Varanasi.

Udyam is the annual technical fest of the Department of Electronics Engineering, Indian Institute of Technology (BHU), Varanasi organized from Apr 15-18, 2021.

The CP round of SpyBits is a hugely anticipated annual affair now, entering it’s 11th edition under different names and forms. It will take place on April 15th from 9:00 PM — 11:30 PM IST.

We would like to thank our Title Sponsors, CoinSwitch Kuber, and the Event Sponsors, Silence Laboratories.

Click here to go to the contest page.
Click here to go to the contest discussion page.

The Problem Set has been prepared by Gol.D.Roger, adikrsingh and me, dakshgarg.

We would like to thank jtnydv25, iscsi, 7dan,shikhar7s, emperor_gentoo and pied-piper for their support in testing and preparation of this contest.

Participants will have 2.5 hours to solve 7 problems. The scoring will be ICPC style. The contest will be rated for Div. 2 and Div. 3 participants, but even so, has some hugely exciting problems for everyone!

Prizes! Merit Certificates shall be awarded for the Global Top 15 as well as Top 5 Indian participants

Good Luck everyone! Hope to see you on the leaderboard.

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

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Update: There will be 8 problems in the contest.

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

Reminder: The contest is about to begin in an hour.

»
3 years ago, # |
  Vote: I like it -47 Vote: I do not like it

Why the heck time limit of Gotham is so tight ? Many NlogN solutions easily fail , fix it , if possible .

»
3 years ago, # |
  Vote: I like it -7 Vote: I do not like it

Any Hint for Problem F , in case when we have i and j & arr[i] > arr[j]. How do we handle this case ?

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

    hint: The height of not only i and j but each stone between i and j matters in calculating the final answer.

    Soln
    • »
      »
      »
      3 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Wow. That was a nice one. So the answer for ( i,j) will eventually become ans[max between i,j]

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Can u give an intuition why answer for max of the range is the final answer for the range.

      • »
        »
        »
        »
        3 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        For the $$$ith$$$ stone the maximum height stone(let's say $$$kth$$$ stone) would come in between the $$$ith$$$ and $$$jth$$$ stone so the next stone which is visible would have to have height greater than $$$kth$$$ stone, and this stone would naturally occur after $$$jth$$$ index as we have taken the maximum height stone between $$$i$$$ and $$$j$$$.

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Just connect every element with its next greater element and those which have none connect to n + 1 , now the answer is just the depth of LCA of nodes i and j with just one case when one node is itself the LCA.

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

The problem set is just implementation heavy not thought provoking at all. Anyway, the problem set is okayish.

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

How to solve the problem MINIMUM OPERATION? Can't we do it with binary search?

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    Yes, you can use binary search, this can also be solved in n*k complexity using the previous operations.

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it
»
3 years ago, # |
  Vote: I like it -14 Vote: I do not like it

I enjoyed this problem set — barely any math and all algorithmic problems... Thank you!

»
3 years ago, # |
Rev. 3   Vote: I like it +7 Vote: I do not like it
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I think C was much difficult than D, gave 1hr 40 minutes to C While D took 20 minutes.