Abdelaleem_Ahmed's blog

By Abdelaleem_Ahmed, 7 months ago, In English

Hello, codeforces community!

I am happy to invite you to participate in Shorouk Academy 2024 Collegiate Programming Contest that will held at Shorouk Academy. The online training will be on codeforces gyms and will start on Saturday, April 27, 2024 at 11:00 EEST.

The unofficial contest will take place in Codeforces Gym, following standard ICPC rules where individual and team participation are allowed. The contest is unrated and will last for 5 hours, featuring 13 problems.

The problems are written and prepared by only me — Abdelaleem_Ahmed.

Thanks to khepri, SalahSalem, HitmanX97, AbdalrhmanEssam, 3zim, Eslam_Ahmed, Abwbkr, OMAR_TAHA, ipy_, Ahmed_Dyab, Dr.rabi3, Glitch00, A7md_Roshdy, AhmedEhab, --ALPHA-- for solo testing.

Thanks to Shorouk Academy for hosting the onsite contest.

Thanks to Polygon for providing the amazing platform for creating and preparing the problems, and to codeforces for the hosting of the online training.

I hope you enjoy solving the problems. Any feedback will be appreciated.

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

»
7 months ago, # |
  Vote: I like it +5 Vote: I do not like it

where is the editorial ?

»
7 months ago, # |
  Vote: I like it +5 Vote: I do not like it

The editorial !

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The editorial !

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve C ?

  • »
    »
    6 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Binary Indexed Tree (2D)

    • »
      »
      »
      5 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Can you please explain your solution? We can't make 2D vector for the BIT! then how to solved it using 2D BIT?

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Editorial?

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    bit2d

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

      Can you explain a little bit, how you applied BIT in it?

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

        you can think of every pair (a_i, b_i) as a point in the coordinate plane. to not think a lot about coordinate compression you can just stick bit2d into it. Talking about question C

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

          Thank's!

        • »
          »
          »
          »
          »
          5 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          But we can't declare a 2D vector of size [n][n] to make the 2D bit, since n is upto 1e5, then how we can do it using 2D bit ? Can you please explain a bit more ?

          • »
            »
            »
            »
            »
            »
            5 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            a BIT2D doesn't just consist of n BITs. it works a bit differently and I can't explain better than tutorials on codeforces.