Gheal's blog

By Gheal, 2 years ago, In English
Vote your favourite problem

103633A — The Hatchet

Author: tibinyte

Rate Problem
Solution
Code (C++)

103633B — Floor Or Xor

Author: tibinyte

Rate Problem
Solution
Code (C++)

103633C — Yet Antother Constructive Problem

Author: Gheal

Rate Problem
Hint 1
Hint 2
Solution
Code (C++)
Post Scriptum

103634A — Bamboo Coloring

Rate Problem
Solution
Post Scriptum

Code (C++) (cadmiumky)

Note: this code can be further optimized by removing the $$$lca$$$ function

103634B — Xor Or Floor

Author: tibinyte

Rate Problem
Solution
Code (C++)

103634C — Jump

Author: Gheal

Rate Problem
Solution
Code (C++)
Post Scriptum
  • Vote: I like it
  • +30
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it +17 Vote: I do not like it

Thanks for the amazing contest strangers, it was very fun!!:)

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

    Thank you for the kind words stranger! Congrats on getting top 5 in Div 1!

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

    Thanks, stranger I've never met before!

»
2 years ago, # |
  Vote: I like it +19 Vote: I do not like it

About Xor Or Floor.

Looking at Editorial's code, it seems to me that it would TLE in cases where M is large (e.g. N = 2, M = 5 * 10^5), am I mistaken?

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

    Nvm

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

      Is it "Floor Or Xor" instead of "Xor Or Floor"? Sorry if I'm wrong.

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

    It would, but that can be easily fixed. We only had test data with big N to fail the $$$N^2 \cdot M$$$ solution for the last subtask so I didn't even notice that it would fail for big M. I reuploaded the code which should work for big M as well. Thanks for finding this issue!

»
2 years ago, # |
  Vote: I like it +10 Vote: I do not like it

Vote your favourite problem

Honestly, I don't see the hype surrounding the hatchet, I would honestly bury it.

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

Gheal please could you tell me why my code is not accepted in? code: https://codeforces.com/gym/103633/submission/151426182

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

    You have TLE, the intended complexity being O(N)

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

      Why should it be TLE, if the complexity of my codes is N log(N)?

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

        The intended complexity is O(N), the limits and tests are tailored to allow only such solutions to get maximum credit.

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

          Thank you for explaining