anup.kalbalia's blog

By anup.kalbalia, 12 years ago, In English

CodeChef invites you to participate in the February CookOff 2012 at http://www.codechef.com/COOK31.

Time: 17th February 2013 (2130 hrs) to 18th February 2013 (0000 hrs). (+5:30 GMT) — Check your timezone.
Details: http://www.codechef.com/COOK31/
Registration: Just need to have a CodeChef user id to participate. New users please register here

Problem Setter: Anton Lunyov
Problem Tester: Hiroto Sekido
Editorialist: Ashar Fuadi

It promises to deliver on an interesting set of algorithmic problems with something for all.
The contest is open for all and those, who are interested, are requested to have a CodeChef userid, in order to participate.

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

| Write comment?
»
12 years ago, # |
  Vote: I like it +12 Vote: I do not like it

Seems like lots of maths and number theory, right?

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

"Connection failed:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)" :-(

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

    It was initial load. Should not be so now. Let us know if you still face it.

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

      Every time I submit a solution it shows me this message.

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

How fast works model solution by problem "Minimal Weighted Digit Sum"? My solution local works about a second (on different tests with maximum m) and didn't pass :-(

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

    I spend several hours (like 6-8 I guess) to find "different tests with maximum m" that are indeed tough. My fastest solution runs in 0.85 seconds while clean and written completely on STL solution in 1.16. So TL satisfy silent rule at least 2 times from the author solution.

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

      What is asymptotics for the solution? ?

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

      Can you share tests that you have find?

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

        The nine toughest test cases:

        3131343  0 279 1 283 35 165 94 54 135 271  
        3141503  0 174 267 1 171 192 21 114 244 57  
        3141503  218 222 27 276 215 180 96 289 1 0  
        3141459  23 128 1 150 64 157 129 231 68 0  
        3141459  64 98 75 285 1 199 298 303 6 0  
        3141592  313 313 313 314 314 314 313 313 314 1  
        3141591  313 313 314 313 314 313 1 314 313 313  
        3140609  100 247 211 205 249 137 211 300 7 199  
        3004119  31 191 35 213 78 265 287 99 224 1

        I hope you can generate answers by yourself.

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

          4 seconds on 3 tests. On other less than 2 seconds :-(

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

            Sorry for "capping".
            But it only means that you should always estimate the complexity properly and not underestimate test data thinking "perhaps test data do not contain such over-killing tests".
            That was one of the insights behind the problem as well :)

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

              Now my solution works 2 times faster. But I think that it's only hacks. I think that I have estimated the problem complexity correctly.

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

    Could you please explain you approach as the answer to the editorial?
    http://discuss.codechef.com/questions/6652/minwdsum-editorial
    It seems like some hash-table but I don't get it completely.
    I saw similar approach in other solutions as well,
    for example, in solutions of Gennady or Mugurel Ionut.

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

      I'll do it soon. UPD: Looks like I'm doing the same as authors, so explanation isn't need.

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

The editorials must be visible here: http://discuss.codechef.com/tags/cook31/

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

    Why there is no submit button here?

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

      @homo_sapiens: The problems are still being moved into the practice section. Once the move is complete, the should appear.

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

When will the ratings be updated.. It is almost two days now..

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

    Because of the issues that we faced during the contest, there have been unintentional submissions made which has resulted in incorrect penalties. We are trying to find our all such submissions and invalidating them so that they do not take part when we calculate the ratings. It should be over in a few more days.

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

      The ratings for February Cook-Off 2013 have now been updated. The users had made multiple wrong submissions without intending to do so due to the site issues. We have excluded unintentionally made submissions and recalculated the penalties to be fair to all. We regret the delay and hope that we have been fair in the end.

      http://www.codechef.com/rankings/COOK31