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

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

I have faced this problem in my unofficial national team selection test and i have been trying to solve it for days to no avail... Hope someone could help me :(

Given an integer array of length n (n <= 100000). Alberto and Brendaly play a game on it. On each turn the player picks a number from one of the 2 ends of the sequence. Alberto goes first. Both players wants to maximize their total score by the end of the game. If they both play optimally, whats the total score Alberto gets? all elements in array are not larger than 1e9.

Thank you!

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

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

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

Given a set of circles on a Cartesian plane, there are no 2 circles sharing a point. For each circle we want to find the smallest circle that contains it, or report that there is none.

I tried many solutions that works with rectangles, but none can be modified to work with circles. Any suggestions? :(

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

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

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

I stumbled across this tree problem and i can't seem to find the name of the data structure for the problem.

It's like this: You are given a tree and a set of nodes. I want to build another tree that contains all the nodes needed and removes all the uneccessary nodes. I believe it's called virtual trees or something, but i just can't find any materials about it. Could anyone tell me the name of it? Some documentations about it helps too.

Apreciate all helps! Thanks

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

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