eduardische's blog

By eduardische, 12 years ago, translation, In English

Just as reminder, the round is scheduled at 16:00 UTC. Top 1000 contestants advance to Round 2.

  • Vote: I like it
  • +81
  • Vote: I do not like it

»
12 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

I've solved problem B large but got Wrong Answer because of silly problem my code

when I divide my long double-type variable by 2 million times it becomes too small and tend to zero after that when I multiply it by some numbers it still zero.

actully what I wanted to compute is [ C(n,k)+C(n,k+1)+C(n,k+2) .... + C(n,n) ] / 2^n for some numbers n,k

fails large input file but my algorithm is correct.

  • »
    »
    12 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    What I did was compute c(n,k)=C(n,k)/2^n in a table of doubles. The combination of multiplication and division by large doubles can be tricky, so it's good practice not to use it — most of the time, it can be replaced by simple multiplication and summation.

»
12 years ago, # |
  Vote: I like it +22 Vote: I do not like it

I played with Google Charts and made the following map: Google CodeJam 1st round statistics. It's just an experiment to learn Google Charts for this occasion. It shows 1000 * Round2 / (Round1A + Round1B) taken from Google CodeJam Statisics.

  • »
    »
    12 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Single person statistics can be kinda tricky, if you notice the blue countries... good job anyway