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

Автор hmehta, 3 года назад, По-английски

Single Round Match 798

Topcoder SRM 798 is scheduled to start at 12:00 UTC-5 on Jan 23, 2021.

Registration is now open for the SRM in the Arena or Applet and closes at 11:55 UTC-5. The coding phase will start at 12:05 UTC-5, so make sure that you are all ready to go.

This SRM will award points towards Stage 3 of TCO21 and also the qualifications for TCO21 Regional Events

Some Important Links:: Match Results (match results, rating changes, challenges, individual test case results), Problem Archive, Problem Writing, Algorithm Rankings, Editorials and Older Editorials(SRM 710 and before),

Best of luck!
- the Topcoder Team

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

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

500: Instead of counting number of inversion which is much harder but oeis-able, we use minimum number of swaps.

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

    But the time limits were much stricter in srm bcz of which I got TLE in only 1 case :(

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

    If I'm not mistaken, for 500 that stackexchange resource proposes an $$$O(n^3)$$$ solution. How do you improve it to run in $$$O(n^2)$$$?

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

      It's not O(N^3) because you don't need to compute that formula for all N. Basically we iterate over the number of cycles K and then apply the formula to find each d(N, K) for the fixed N and K.

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

        Actually, we can do away with O(n^3) as well, precompute our answers and put them in the code.

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

          That's actually exactly what I did during the contest LOL. I'm trying to upsolve it in $$$O(n^2)$$$ as an excercise.

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

    D — Urban Planning has a subproblem which counts expected no of cycles in a permutation.
    There isn't much difference between soln for permutation and derangements.

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

I guess it's time to start downvoting blog for having bad problems?

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

The website was causing problem during the contest and even now!!!

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

Are you guys able to access topcoder arena? For me, it throws 404 error.

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

I wasn't able to open the arena, the java applet wasn't working, I am facing this problem a lot of time nowadays, it gets stuck in downloading and never opens, sometimes using a VPN works else it's just a pain.

Why is that so hmehta?