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

Автор darkshadows, 11 лет назад, По-английски

Hello Codeforces community!

I am glad to announce that HackerRank 101 Hack 26th edition will be held on 23rd June 2015 at 16:30 UTC. You can sign up for the contest here.
The problem statements will be available in English and Chinese. Though what's priceless is solving interesting problems and the thrill of competition, prizes make the competition fierce. Top 10 performers will get a HackerRank T-shirt.

Problems have been set by me(darkshadows) and tested by wanbo. The contest will consist of 5 problems with variable scoring distribution. I have tried my best to set a balanced problem set. Hopefully everyone will enjoy. Also, you'll be able to enjoy the detailed editorials written by the setter.

Good luck and have fun!

UPDATE1 Scoring is 30 — 40 — 50 — 100 — 120.
Cumulative time taken to solve the challenge is used as a tie-breaker.

UPDATE2 Editorials for all problems have been enabled.

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

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

Clashes with CF Round 309 now :(

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

Starts in a few hours.

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

first three are too boring to solve and last two are too hard to solve — this contest was so unlucky for me:(

  • »
    »
    11 лет назад, скрыть # ^ |
     
    Проголосовать: нравится -11 Проголосовать: не нравится

    The first three are boring, but the last two are quite standard. Still I haven't managed to solve the fifth because I have spent too much time (about 40 mins) on the second problem lol.

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

      Oh, at least I am not the only one :) I spend 50 minutes on 2nd, feel ashamed :)

      In fact I don't agree with Neodym, I'd rather say that last 3 problems are boring (and standard), comparing to first two :)

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

      I did not solve second one. Spent almost an hour on it... What is the idea behind? My code is here.

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

        I can explain what I did .please be patient :P A- rotating ball . B is ball thrown from origin.

        • First I tried sending ball B at t=0. I found position of ball b at time =R (time taken by ball to reach at the circumference with thrown at time =0) if this position was in the first quadrant. Then optimal answer would be the one we get by throwing the ball B at t=0 answer in this was would be "R R%S/ gcd(R%S,S) / S/GCD(R%S,S).

        • if position of ball B at t=R is not in the first quadrant then answer would be "(r/s + (r%s):1?0)*s 0/1" because he can wait for some time t>0 and then throw the ball such that it collided at R,0

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

What's wrong with this approach for 2nd : - r=r%s. if(r belongs to 0..s/4) print r/gcd(r,s) "/" s/gcd(r,s) - otherwise print 0/1 explanation : if r through at t=0 can reach a place in the first quadrant than do so . otherwise it can r,0 point in the next cycle

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

editorials?

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

Almost did task no.4. Suffix-Array + Lcp + Fenwick tree + Mo's algorithm. code However, getting TL... :(

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

Is there any problem in using Math.floor(1 + Math.log10(number)) to get the digit length? My one test case failed in 3rd question due to that.

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

Is there any edge case in 5th question? I got a seg fault on 3 test cases.

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

For 3rd what should be the output for 1 53959375 29374943

»
11 лет назад, скрыть # |
Rev. 4  
Проголосовать: нравится +14 Проголосовать: не нравится

It is just me or everyone felt that 3rd was quite easier than 2nd ? :P

Edit : I did it with O(17) ad-hoc solution per test case.

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

106 bytes for stack size? Are you seriously? Can you please increase it? As I know, it's a common practice.