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

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

I am stuck in this problem for some time now :( :(. it will be very helpful if anyone can give me some hint.

problem link : problem

My idea :

lets consider each light individually.
Let p is the probability of selecting the light. this p can be found easily by calculating each dimension of the 3d cube separately.

Now the expectation for a light will be sum over i(1 to k) : p^i * (1-p)^(k-i). (K is the number of turns) Now we only need to add the terms where i is odd as only then the light will be ON.

calculating this for all the bulbs is obviously time out :( :( :( is there any close form? i can't find it :( :( :(

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

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

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

I was trying this problem 234C My code failed in test case 1 :( :( judge says that my code is not giving any output at all for case 1 :( :( :( I checked my code in the custom test section with that case and found that my code is giving the right answer.

My Code : 3582788

found the problem :) :) for this problem the input/output tech was from file

thanks

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

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

Автор Sanzee, 14 лет назад, По-английски
we  are working on a educational OJ .We are facing difficulty finding total memory used by a java code in Linux (CenOS). As Linux process table shows the sum of the JVM memory and the code memory.How can I find the specific memory used by a java code ??????
please help.



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

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