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

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

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 :

RHaque, immuntasir, Jami_CSEDU, nafisiham, prophet_ov_darkness, raida_ash, shadowfax, tanzon0xA5 and tube_light.

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_Farmon

Thanks everyone. The editorial will be posted very soon.

Update2:

Editorial has been published.

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

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

:-)

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

Where is the link to the contest?

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

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

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

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

  • »
    »
    6 недель назад, # ^ |
      Проголосовать: нравится +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.

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

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

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

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

  • »
    »
    6 недель назад, # ^ |
      Проголосовать: нравится 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.

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

      How did you arrive at it ???

      • »
        »
        »
        »
        6 недель назад, # ^ |
          Проголосовать: нравится 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 :)

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

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

»
6 недель назад, # |
  Проголосовать: нравится 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

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

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

    • »
      »
      »
      6 недель назад, # ^ |
        Проголосовать: нравится 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.

      • »
        »
        »
        »
        5 недель назад, # ^ |
          Проголосовать: нравится 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

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

Editorial has been published.