Блог пользователя anup.kalbalia

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

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.

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

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

Seems like lots of maths and number theory, right?

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

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

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

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 :-(

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

    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.

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

      What is asymptotics for the solution? ?

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

      Can you share tests that you have find?

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

        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.

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

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

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

            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 :)

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

              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.

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

    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.

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

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

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

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

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

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

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

    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.

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

      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