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

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

Hi everybody!

I'm inviting you to take part in the April Cook-off 2015 on CodeChef at http://www.codechef.com/COOK57. The problems are prepared by me this time.

Time: 19rd April 2015 (2130 hrs) to 20th April 2015 (0000 hrs). (Indian Standard Time — +5:30 GMT) — Check your timezone.

Details: http://www.codechef.com/COOK57

Registration: Just need to have a CodeChef user id to participate.

New users please register here

I would also like to thank all guys that were taking part in preparations of this contest:

Good luck!

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

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

Hey its starts now

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

Huh, there are 0 problems in the contest. That was easy :D

And occasional errors 502 and 503.

UPD: The problems seem to be there.

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

502 Bad Gateway

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

Every time they are having issues at the start of the contest. That's bad....

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

    I thought they said that they resolved issues and improved system a lot; didn't they wrote about it after January Cook-off fail?.. And both February and March Cook-offs started relatively well... But now old CodeChef is back :)

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

Now mom asking me to go and wash dishes instead of waiting for problem to appears

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

    I've just washed dishes too. Still no problems.

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

      But at least no dirty dishes, either :D

      There they are now! (of course, there are still countless failed requests)

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

Only the count-down timer is working perfectly

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

UPDATE : Codechef is back . I can see the problems

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

We are trying to get the site back. Apologies for the inconvenience. Request you all to wait for some time.

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

It seems the scoreboard is broken... the suspense is killing me!

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

How to solve LFIVE faster than O(n^2logn+q)? And is there anybody who solved it with this complexety? Thank you!

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

    I solved it with that complexity: http://ideone.com/j7Ee34.

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

    I solved it with this, too; after failing to optimize my O(QN) solution.

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

      There was a way to optimize an O(N^2 + NQ) approach so it would get an AC. The key point is to use memory cache efficiently: multiplying two rows of a 2D matrix is five times faster than multiplying a row and a column of the same matrix.

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

        So you create a transposed copy of the original matrix and then multiply the rows of these two matrices, or is there another way?

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

          No, that's pretty much what you should do if you want to multiply a row and a column of one matrix in general case. Talking of this problem, you could store only one matrix just by making f[j][i] equal to f[i][j] (i < j).

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

      I have both O(N^2 log N + NQ) with efficient using of memcache and O(N^2 log N + Q) solutions and they run pretty much the same time.

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

I think solving the last problem(AGENTS) in python is quite easy : I have figured out the general equation(#)
And I know that there is a module available to solve system of linear equations. And so I directly used that, Here is my solution : http://www.codechef.com/viewsolution/6799925

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

    To be honest, I didn't consider such an approach in Python while preparing the contest. But it's nice if you got an accepted with it since the main idea of the problem was not to solve a system of linear equations but to build that system.

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

      Yes, developing the system is nice. It remembered me about my 12th class where we used to do lot of problems in integration. And I am excited that this is my first contest in which I have done hardest problem and ofcourse 3 problems.