LastDance_NotLastOfMe's blog

By LastDance_NotLastOfMe, 17 months ago, In English

Hello, Codeforces!

I am happy to invite you to participate in Al-Baath Collegiate Programming Contest 2023 that was held at the Al-Baath University Jun/22/2023 11:00 (Moscow time).

The problems were authored and prepared by Mahmoud_Haddad, Blade-Master, nooooob_KiFaH_HeLaL, Geo_Ghaffar, Basharo, molhaam1, somar_mh, Tinky-Winky, and me.

I would like to give our sincere thanks to:

And a special thanks to EleCursity, who helped us coordinate the contest onsite and made sure that everything ran smoothly.

We would love to hear your feedback on the problems in the comments section. We hope you have a blast participating in this contest and wish you the best of luck!

Contest Feedback

Happy coding!

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

| Write comment?
»
17 months ago, # |
  Vote: I like it +25 Vote: I do not like it

As a tester, Geo_Ghaffar orz

»
17 months ago, # |
  Vote: I like it +27 Vote: I do not like it

orz

»
17 months ago, # |
  Vote: I like it +30 Vote: I do not like it

It is a pleasure to work with you. Looking for positive feedbacks ^_^

»
17 months ago, # |
  Vote: I like it +22 Vote: I do not like it

As a tester, the problems were really interesting and I would definitely recommend them.

Oh and also, Geo_Ghaffar orz.

»
17 months ago, # |
  Vote: I like it +13 Vote: I do not like it

How to solve K???

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

    Take a look at the other problems, some of them are easier. We will soon publish brief solutions or editorials.

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

    .

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

      Actually there is something missing or something that is misunderstood.

      because after coloring the card with number 1 -in fact- all the other cards still be reachable.

      the statement says: He can paint a black card (i) with red if and only if there is another black card (j) ......(not) there is another red card (j).

      we know that for each card (j) there are always two cards ,let us call them (a) and (b), and there is a way to get from (a) -or (b)- to (j) passing through exactly two cards differ than (a) -or (b)- and (j).

      It could be proven that coloring a card(j) "j!=1" that the two previous mentioned cards (a) and (b) are still uncolored will make it impossible to color n-1 cards at the end. ( the prove of this fact will be in the tutorial when published).

      And the previous fact is what makes the code above works, and the reachable indices -in the solution section- should be called valid indices not reachable.

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

        .

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

          yes you're right, but the problem has been changed and I just wanted to clarify the tutorial of the actual problem.

»
17 months ago, # |
Rev. 2   Vote: I like it +35 Vote: I do not like it

I am glad that I have been part of the testing process.

And as a tester, I had a great time joining this gym ^_^

»
17 months ago, # |
  Vote: I like it +11 Vote: I do not like it

how to solve I ?

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

    Take a look at the other problems, some of them are easier. We will soon publish brief solutions or editorials.

    Hint1
    Hint2
    Hint3
    Hint4
    Solution
»
17 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Any hints for problem D ?

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

    "Brute force all possible subarrays, considering the largest number as 1023. Therefore, the worst-case scenario would involve iterating through 1024*1024*10 (number of bits) https://pastebin.com/Q9DPh3RJ

  • »
    »
    16 months ago, # ^ |
      Vote: I like it +9 Vote: I do not like it
    Hint1
    Hint2
    Hint3
    Solution
    C++ Code
»
16 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Any hints for problem I plz ?

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

how to solve F? i can't detect the error in my code nor the logic

  • »
    »
    16 months ago, # ^ |
    Rev. 2   Vote: I like it -11 Vote: I do not like it
    Hint 1
    Hint 2
    Solution
    Code C++
  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it can' be solved using dp ?

»
16 months ago, # |
  Vote: I like it -8 Vote: I do not like it

Any Hints to solve problem J?

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

Thanks for the amazing problem any idea how to solve problem E

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

Any hints for $$$J $$$ $$$?$$$

»
16 months ago, # |
  Vote: I like it +3 Vote: I do not like it

When & where editorial will be published?

»
14 months ago, # |
  Vote: I like it +10 Vote: I do not like it

I think there is a mistake in testcase 4 (and probably some other testcases after that too!) for problem H, the polygon given on that testcase is probably on counterclockwise order (which in problem description the polygon given should be on clockwise order), thanks to this I wasted 2 whole hours to find a counter testcase to my solution which is can only works on clockwise order. But there is none, since when I reverse the order of polygon when it was given on counterclockwise order then I got AC.

»
13 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

I want to know how to solve H. I use sweep line and segement tree to maintain the number of intervals that cover the points, but i can't solve those points at the endpoint of interval. I'm hopeful that someone can provide hint of this problem. Your response would be highly appreciated. Thank you.