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

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

I was reading the convex hull trick can anybody explain me the function bad and add in the solution. Solution

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

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

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

I am trying to solve manhattan centre from cs academy. I am thinking to apply binary search on answer for x between 1 and 100000000. According to me the graph of the function will be a parabola.So what I am doing is I am calculating three values one at mid,mid+1 and mid-1 and checking if I am on the left side of the parabola low=mid+1 else if I am on the right side of the parabola high=mid-1. Else if I find the min point then it is the answer.But the solution is not working in the way that I wanted it to be can anyone tell me where I am going wrong.Also I saw some of the submissions where people applied ternary search and got the correct answer. As far as I know all the problems solved with ternary search can also be solved with binary search also.Here is the link to my solution. SOLUTION. Sorry for my poor english.

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

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

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

Can anybody help me in converting my recursive solution of Cards and Joy this problem into DP. Here is the link to my solution link

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

Теги #dp
  • Проголосовать: нравится
  • -4
  • Проголосовать: не нравится

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

I want to know how to binary search on answer where the function is first decreasing attains its minimum and then again function starts increasing.

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

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

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

Can anybody tell me how to solve Atcoder question Equal cut. The question is Cut the array at 3 positions such that difference of maximum sum of any one part and minimum sum of another part is minimum?

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

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

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

Can anybody explain me how to convert Cyclic graph into Acyclic Graph with different layers.

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

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

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

Problem Can anybody help me on how to figure out the dp behind this problem. I have already written a recursive solution for this problem. Also can anybody help me how to see after writing the recursive code that what are the states of the dp.I got too much difficulty in determining the states of a dp solution.

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

Теги #dp
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится