RedNextCentury's blog

By RedNextCentury, history, 9 years ago, In English

Hello!

On Sunday, 15 November 2015, 08:00:00 GMT , an online mirror of the ACM Egyptian Collegiate Programming Contest 2015 will be held in Codeforces Gym.

The problems were prepared by :
m.radwan, Alex7, amrSamir, nnahas, muaz-32, Jarrar, ahmad_mamdouh,Madhat Alsoos, Noor Alasadi, Islam Diaa, Alhussain Aly.

You will be given 5 hours to solve the problems.

The problems vary in difficulty and need a wide range of solving techniques, so I strongly recommend to participate in this contest.

Good Luck and have fun!

UPD: The contest has ended
Any feedback about the contest is appreciated.

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

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

How many stars is this contest in difficulty?

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

where is the problems pls! .

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

    The contest will start 3 days later, you will see the problems when it starts.

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

Would you -as a contestant at SCPC2015- rate the problems with the same difficulty as SCPC2015 problems?

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

How to solve A , next_permutation caused a TLE

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

    I solved it by counting how many numbers are larger than the entered number(n), except the last one, let's call their count (CC) then did the following:

    res = probability of getting the largest one from the first try (1/size(n)!)

    find in how many ways I can choose 1 out of the larger numbers = C(CC,1) and multiply it by the probability of that which is (1/size(n)!)^2

    find in how many ways I can choose 2 out of the larger numbers = C(CC,2) and multiply it by the probability of that which is (1/size(n)!)^3

    Keep doing so until you reach C(CC,CC) * (1/size(n)!)^(CC+1) or whenever the result of that step is less than a small eps, but be careful eps should be really small! I got around 12 WA just because eps was 1e-10, when I changed it to 1e-14 I got AC.

    Add up the whole thing and this will be the answer

    I think there are other simpler solutions though.

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

Auto comment: topic has been updated by RedNextCentury (previous revision, new revision, compare).