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

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

I usually like to wait for chrome or someone else to remind all you good folk about an upcoming SRM but it seems like they have forgotten. So here goes.

Hi there!

Tomorrow at 6:30 IST will be held Topcoder SRM 661.

Let's discuss problems after contest!

GL && HF.

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

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

 Anyone knows about the goodies, rankwise or random?

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Will you be able to wake up in time? :P

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Reminder for anyone who is awake but not registered. 5 minutes left till end of registration.

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +68 Проголосовать: не нравится

Congratulations to Swistakk on finally getting into top5 :)

BTW, can someone please explain where does that magic formula for div1 450 come from?

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve Div2 500?

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

950 < 500 < 250

Div-2 contestants will understand -_-

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

How to solve div2 1000? Was there some magic formula there?

  • »
    »
    11 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    Imagine that you are constructing the same graphs but in a different way: for each i between 1 and N, inclusive, you:

    1. choose whether you want an edge from node i
    2. if you do want it, choose where it points (i-1 possibilities)
    3. color the node (K possibilities if you didn't draw an edge, K-1 if you did)
    • »
      »
      »
      11 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Now I think I should have spent a little more time on the 1000(in today's case 950) rather than the 500. :(

    • »
      »
      »
      11 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Okay, so for some i<=n, shouldn't the correct relation be

      ans = ans * (k + (k-1)*(i-1)*k) ?

      Where the second term means : Colour the current value in k ways, and have i-1 possible edges leading to k-1 different colours?

      • »
        »
        »
        »
        11 лет назад, скрыть # ^ |
         
        Проголосовать: нравится 0 Проголосовать: не нравится

        no the recurrence is something like

        f(1) = K, as we can choose one node with colour 1, 2, ..., K

        f(n) = K*f(n-1) + (n-1)*(K-1)*f(n-1)

        the first term is translation to: put the n-th node on the right side of the f(n-1) old graphs choosing its colour to be 1, 2, ..., K

        and about the (k-1)*f(n-1) it is about: for some i in the range 1<= i <=n-1 (so there is (n-1) such i) put the n-th node and connect it with an edge to this i-th node we can do that only if n-th colour is different from i-th colour which allows to choose (K-1) colour

        • »
          »
          »
          »
          »
          11 лет назад, скрыть # ^ |
           
          Проголосовать: нравится 0 Проголосовать: не нравится

          Yes, but regarding the second term, Shouldn't you select the current element's colour in K ways, and the for each of these colours, an edge which leads to the n-1 elements each with k-1 colours?

          • »
            »
            »
            »
            »
            »
            11 лет назад, скрыть # ^ |
             
            Проголосовать: нравится 0 Проголосовать: не нравится

            yes I understand what you mean, the approach written above is about another approach from what you are thinking. In my opinion it is simpler. However if you want to solve it considering the idea you have, you have to change the definition of f(n), for the approach above f(n) = the number of graphs that can be constructed in the way mentioned in the problem statement (and have n nodes) using all K colours. Maybe for your approach you have to define something like f(n, m) = the number of graphs that can be constructed in the way mentioned in the problem statement (and have n nodes) using m colours or something else.

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Approach to solve Div1 250 plaease?

  • »
    »
    11 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    Since LCM(N + 1..M)|LCM(1..M) (think why) and LCM is the product of maximum prime powers dividing some number in the respective ranges, you only need M large enough for any pk that divides some number  ≤ N (i.e. any pk ≤ N, but you don't need this) to divide also some number x between N + 1 and M (the smallest such x), so M is the maximum of these x. Therefore, you just need to factorise all numbers up to N by the sieve of Erathostenes.

    • »
      »
      »
      11 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Btw, Can you prove that in fact we only need to consider pk -  > 2pk and that all cases xpk -  > (x + 1)pk are not needed? It is sufficient to prove that there is any power in an interval and that is in fact true even for just primes (maybe for sufficiently large n's), but it's some freaking hard math xd.