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

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

So you have an array A of size N. Let's say 10 20 40 80 10 What we have to do it divide the array into two subSequence such that. The difference between the absolute value of first and second is minimum. in the above case, the answer would. first subSequence 10, 10 = 0 second 20 40 80. = (20 + 40) = 60

can anyone help?

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

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

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

Problem link Hi i am trying a variant of the above problem. with probabilty introduced with each node

From same problem our simplified but complicated version. Now lets assume from root ,all the vertices are directly connected to the root. But we the probability of selection of node i is p[i] such that any p[i]>0 and sum of p[i] is 1 We have to find the expected chances to delete the whole tree..same as the original problem

Now to deleted the root probability p[root] but now to delete the the children probability of direct removal is p[child]/p[root]+p[child]; But when i simulate i am getting wrong answer.. Can anybody help me where approach is going wrong

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

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

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

Problem link I have seen the solution but i dont understand how the recurrance relation is dp[i]=dp[i-1]+dp[i-2]+2;

Can somebody explain it to me.

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

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

Автор peaceful_warrior, 10 лет назад, По-английски

I am getting wrong answer for Test Case 4(Problem C) : http://codeforces.net/contest/546/submission/11226594

But When I run the same Code in Ideone and My Linux Machine I am getting the correct output.

MY code (same as submission Link above): http://ideone.com/NmWgjc

Don't Know why Such Weird Problem is happening. Any Help Will be Appreciated.

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

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

Автор peaceful_warrior, 10 лет назад, По-английски

How would one compare TC Rating vs Codeforces Rating i want to know what is range to compare a TC rating with codeforces Like a guy rated 1700 in codeforces is equivalent to to what in TC.

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

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