RedNextCentury's blog

By RedNextCentury, 8 years ago, In English

Hello!

On Friday, 12 February 2016, an online mirror of the ACM Damascus Collegiate Programming Contest 2015 will be held in Codeforces Gym.

The problems were prepared by : Pepe.Chess, majd.gda1, Jarrar, Alaa Jarad, Feras Al-Kassar, Mohammad Asaad, Mousaab Orabi.

You will be given 5 hours to solve the problems.

The difficulty will be similar to a div2 round.

Good Luck and have fun!

UPD: The contest will start in 30 minutes

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

| Write comment?
»
8 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Are we allowed to participate in teams or just individuals?!

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Sorry, why I can see problems ?

Is it something about coach mode?

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone explain how to solve E ?

»
8 years ago, # |
  Vote: I like it +7 Vote: I do not like it

is there a editorial for the contest??

»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Great problems .. thank you ;)

»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

How to solve problem A ? can anyone please explain it :D

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

    We can use a dynammic programming with a bitmask to solve. The mask represents which gangster remains alive. Now, we need simulate all the fights between 2 live gangsters.

    For more details, see my code in: https://github.com/juniorandrade1/Damascus-Collegiate-Programming-Contest-DCPC-2015-/tree/master

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

      Would you please explain more about your solution, or if you can suggest a good tutorial about DP + Bitmask technique :D thank you very much :)

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

        Well, as I said, I use a dp with bitmask

        1. First, I define if bit 'i' is active ( (1<<i) & mask ), the gangster 'i' continues alive.

        2. Line 51: Try all the possible masks. You know previously the result of this mask.

        3. Line 52: You need find the number of chooses you have to pick 2 gangsters. Is easy to see that this number is equal a (x * (x — 1)) / 2 [ x is equal a number of active bits in mask]

        4. Line 54 and 55: Iterate all possible pairs of gangsters and choose all pairs that 2 gangsters remains alive

        5. Line 57 and 58: Calculate dp[mask^(1<<j)] = game without the gangster j and dp[mask^(1<<k)] = game without the gangster k.

        I hope have been clear. Sorry for my bad english :)

»
8 years ago, # |
  Vote: I like it +7 Vote: I do not like it

I didn't write a editorial, but my all AC codes are available in:

https://github.com/juniorandrade1/Damascus-Collegiate-Programming-Contest-DCPC-2015-/tree/master

»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Can anyone tell me why am getting WA on test2 problem F ????!!!!!

it drives me crazy !!!

this is my code

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

    There is a discussion about it right now in Russian thread :)

    This test is broken, it has T=17, but then 16 tests cases follow.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What the hell, problem A is the same as 16E - Fish. Even the same example test. Who were the problem setters you said?