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

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

Hello Codeforces!

On Thursday, 20 April 2017, 13:00:00 GMT , an online mirror of the Bangladesh National High School Programming Contest (NHSPC 2017) will be held at Codeforces Gym.

The problems were prepared by :

Riddho, immuntasir, Jami_CSEDU, nafisiham, prophet_ov_darkness, raida_ash, shadowfax, Tanzir5 and bertho_coder.

This is an individual contest hosted as a preliminary selection contest for IOI participants of Bangladesh. You will have 3 hours to solve the problems. The setters have decided to rate the difficulty of the contest to be 3 stars. There's a wide variety of problems and we hope that you would enjoy the problems in general and have fun solving the contest.

Best of luck.

Update1:

The contest has finished. The top 5 are:

  1. SirirNicheBirirDokan

  2. sahedsohel

  3. mahbubcseju

  4. PM_ME_UR_PROBLEMS

  5. Farhod

Thanks everyone. The editorial will be posted very soon.

Update2:

Editorial has been published.

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

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

Where is the link to the contest?

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

What about the link of the contest? How can we join it?

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

How many problems are there? What's the idea behind having 3 hours instead of 5 hours like the IOI?

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

    There are 8 problems. Actually this is the third edition of this contest. The previous two years, this contest has been arranged to motivate high schoolers for competitive programming. This year for the first time, it has been also used as a preliminary selection contest for Bangladesh IOI team. So the problems may be a bit different from IOI problems. That's why the number of problems and time length is different from IOI.

»
7 лет назад, # |
Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

How to solve D ??? I tried so hard but could not do it ... I am feeling dumb :( Will editorials be posted ???

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

    The editorials will be posted soon. We are working on it. :)

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

    The answer is the number of numbers such that excluding that from nimsum will result in a number less than the main number.
    i.e first calculate nimsum. For each number ai, if (nimsumxorai) < ai then increase answer by 1.

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

      How did you arrive at it ???

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

        I arrive at this during the onsite contest.
        The key observation was, from a pile you can take pebbles in only one way to make a loosing state, if you take something more or less it will always lead yourself to loosing state.
        And to make a loosing state for other, it will be possible only if (nimsumxorai) < ai. Try to prove yourself :)

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

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

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

Can I solve problem B with Binary Search on range [1..5000] ?

Also is the worst possible case 1 1 1e19 ?

I seem to be getting TLE with binary search Java

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

    range [0...5000] in case n >= p already also, how are you checking that the current mid is >= p?

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

      I am using BigDecimal compare which is has a O(lgn) complexity. So I compute x = (1+r%) once and then each iteration I do

      x^mid where mid = lo+hi>>1; is the number of years

      after that I do n*(x^mid); so as to complete the compound-interest formula.

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

        I've the same solution, may the problem be with power function (you need to do fast exponentiation) or with using the BigDecimal, I'm not sure about the O(lgn) complexity to be honest.

        Try using only doubles and unsigned long long for p, that will be sufficient

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

Editorial has been published.