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
Are we allowed to participate in teams or just individuals?!
It's a team contest
Sorry, why I can see problems ?
Is it something about coach mode?
How did you get coach mode?
He reached 1900+ and participated in more than 30 contests
wow :)
Can someone explain how to solve E ?
Same idea of this problem. Check out its tutorial.
Thanks :)
is there a editorial for the contest??
Great problems .. thank you ;)
How to solve problem A ? can anyone please explain it :D
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
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 :)
Well, as I said, I use a dp with bitmask
First, I define if bit 'i' is active ( (1<<i) & mask ), the gangster 'i' continues alive.
Line 51: Try all the possible masks. You know previously the result of this mask.
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]
Line 54 and 55: Iterate all possible pairs of gangsters and choose all pairs that 2 gangsters remains alive
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 :)
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
Can anyone tell me why am getting WA on test2 problem F ????!!!!!
it drives me crazy !!!
this is my code
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.
Fixed, sorry.
What the hell, problem A is the same as 16E - Fish. Even the same example test. Who were the problem setters you said?