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

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

Hi,

Could someone please help me solving this mathematical expectation problem ?

and I would be thankful if there is a code too.

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

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

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

Hi,

I'm facing some difficulties in solving problems that need hard implementation

and I want to improve myself in solving such hard aspect, so could anybody please

give me some problems to train on ?

thanks :)

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

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

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

Hi,

I am not able to access the topcoder's wiki, and every time I sign in to the wiki

I get this error message:

A system error has occurred — our apologies!

Cause:

java.lang.NullPointerException at com.atlassian.confluence.user.ConfluenceLoginInterceptor.afterLogin(ConfluenceLoginInterceptor.java:34)

can anyone help me please ?

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

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

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

Hi,

I'm trying to improve myself in solving problems about probabilities and mathematical

expectation, but I find most of problems hard to me especially those problems where

I need to find the expected value, because I feel that every problem needs a way

to think about that is different from the other problems, and trying to apply

the formal definition of the expected value is always useless.

So, could you please provide me with a way to improve myself or some stuff to study from ?

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

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

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

I was trying to solve this problem on topcoder. The output for the problem is the probability that Jane wins the game, but my problem is that I think that the probabilty of each player to win the game is always 0.5 and that isn't correct according to the output of some given testcases in the problem. The reason of my thinking is that both players have the same number of turns and both of them have exactly the same choices to play. So I wonder if somebody could explain to me why the probabiltiy isn't always 0.5.

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

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

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

Hello everybody,

I'm trying to improve my level on codeforces, so I always try to solve hard problems for me

like C and D Div2 but in 95% I can't solve them my self so I read the tutorials and I

feel that I'm still in the same place after solving good number of C and D problems and I am still

not able to solve C in most cases.

I should tell you that I am practicing alone and I have no coach and just depending on

the web to learn.

So I will be thankful if you tell me how to practice and if there are any resources that I have to learn from?

Thanks.

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

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

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

Hello everybody, Could somebody provide me with a good tutorial for suffix array data structure?

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

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

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

Hello, I am solving this problem and

I am getting Wrong answer when submitting my solution even the results are true on my computer

I am getting:

Wrong answer on test 1 for Microsoft visual c++ 2010

Wrong answer on test 9 for GNU c++ 4.9.2

Wrong answer on test 9 for GNU c++11 4.9.2

Even my answer is correct in the three cases

So what could the problem be ?

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

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

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

Hello everybody, Could you please tell me how to search for a blog on CodeForces ?

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

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

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

Hello everyone,

I am searching for segment tree and binary indexed tree problems on CODEFORCES for training.

I am actually a beginner at these data structures.

So, could anybody suggest me some problems, please ?

Thanks alot.

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

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

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

Hello everyone, I am trying to solve this problem so I've read the tutorial and every thing is clear,but there is one thing that I couldn't understand: in the solution we used binary search to find the minimum value of c(a),so if the range is [L,R] and mid = (R+L)/2 then if we found that mid can't be a value c(a) because we have to change more than k elements then the binary search will be applied on the new range [mid+1,R],so the question is: why if we found that the mid can't be a value of c(a) because it needs making more than k changes then all the values of c(a) that is from the range [L,mid-1] will also cost more than k changes? Thanks a lot.

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

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

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

I always see problems that need to print the result of C(n,m) mod a prime number where C(n,m) = n!/(m!*(n-m)!) the factorial formula of binomial coefficients. I've searched for it and I found that I need to find the multiplicative inverse using extended Euclidean algorithm and I've learnt it. I hope if somebody could tell me the fastest way to find C(n,m) mod P (P is a prime) using extended Euclidean algorithm and I would be thankful if there was a code. Thanks a lot.

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

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

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

I have to get the sum of these terms (2 + 4 + 8 + 16 + ...... + 2^n) % (10^9 + 9). I know that the sum without the mod is given by the formula : 2*(1-2^n)/(1-2) = -2*(1-2^n) but I don't know how to get the sum mod 10^9 + 9. So please could you help me ?

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

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