Блог пользователя RedNextCentury

Автор RedNextCentury, история, 8 лет назад, По-английски

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.

  • Проголосовать: нравится
  • +82
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

How many stars is this contest in difficulty?

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

where is the problems pls! .

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to solve A , next_permutation caused a TLE

  • »
    »
    8 лет назад, # ^ |
    Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

    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.

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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