Блог пользователя Samarth12

Автор Samarth12, история, 3 года назад, По-английски

Hi everyone!

I would like to invite you to participate in the upcoming HackerEarth September Circuits contest. The contest will go live on September 18, 09:30 PM IST.

You will be given 7 days to solve 8 problems. The problems are prepared by me, Kritagya and Arpa. I would like to thank Arpa for coordinating the round and testing it.

The contest will be RATED. I hope you will find the problems interesting.

There are prizes for the top three competitors also:

  • First place: $100 Amazon gift card
  • Second place: $75 Amazon gift card
  • Third place: $50 Amazon gift card

Happy Coding!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

Автор Samarth12, история, 3 года назад, По-английски

Hi all,

This is one of the problems from a hiring contest which is now over. Can someone help me in this?

Given $$$N$$$ lines, no 2 lines are collinear/parallel, none of the lines is parallel to y-axis and atmost 2 lines can intersect at a point. Clearly, these lines divide the 2-D plane into various regions. Given a single point $$$P$$$, determine the region where it belongs to.

I don't have any sample or constraints on $$$N$$$. I wrote some $$$O(N^2)$$$ solution(wrong) and it wasn't giving TLE. The only thing I could figure out after the contest was this. Can someone provide an easy and efficient solution?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +17
  • Проголосовать: не нравится

Автор Samarth12, история, 4 года назад, По-английски

Hi everyone!

I would like to invite you to participate in the upcoming HackerEarth June DSA Contest. The contest will go live on June 12, 09:30 AM IST.

You will be given 90 minutes to solve 3 problems. All the problems are prepared by me. I would like to thank Arpa for coordinating the round and testing it.

The contest will be RATED. I hope you will find the problems interesting.

Happy Coding!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +23
  • Проголосовать: не нравится

Автор Samarth12, история, 5 лет назад, По-английски
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Samarth12, история, 5 лет назад, По-английски

Suppose I have an array of positive integers and I concatenate it K times. Now I want to count the number of subarrays with sum<=S Constraints:- N<=10^5(number of elements), S<=10^5 , K <= 10^8 , 1<= A[i] <= 10^9. Any idea?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -16
  • Проголосовать: не нравится