Tanzir5's blog

By Tanzir5, history, 9 years ago, In English

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.

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

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

Where is the link to the contest?

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

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

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

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

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

    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.

»
9 years ago, hide # |
Rev. 2  
Vote: I like it +1 Vote: I do not like it

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

»
9 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

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

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

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

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

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

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

      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.

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

        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

»
9 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Editorial has been published.