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

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

Hello CodeForces Community,

I would like to invite you to participate in 101 Hack Feb 2016 will be held on Sunday, 21 of February. The problems were set by me (Yury Bandarchuk) and tested by CherryTree (Siarhei Kulik) and wanbo. Also, I am so grateful to pashka for solving some problems on Java.

101 Hack is back with its 34th edition! Passionate programmers will enjoy solving algorithmic challenges. It's all about speed, accuracy and efficiency: 5 challenges in 120 minutes. Every second counts!

Top 10 winners on the leaderboard will receive a HackerRank T-Shirt.

Hope, you will participate and enjoy the problems.

Good luck && have fun!

UPD: Contest has ended! Congratulations to winners! Editorials for every problem are available now.

  1. riadwaw

  2. I_love_Tanya_Romanova

  3. Errichto

Want to hear your feedback about the problems!

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

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

It's colliding with Codechef Cook Off. If possible, can you guys change your timings in order to accommodate that?

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

Want to hear your feedback

I consider the problem statements as well-formed and easy to understand.
Thanks for the round, it was interesting to participate!

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

The problem statement of A was difficult to understand for me. The other problem statements were easy to understand.

C was a nice ad hoc problem that can be solved using many approaches.

In D, how to get the formula with complex numbers? The editorial doesn't explain this.

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

Good problems, however, I failed this round. :)
For me, D was easier (actually I've just googled from OEIS) rather than C, but I was late to code because I couldn't understand its statement. I understood only after my friend explained me. :(

P.S. Hackerrank was showing something like "1 hour 3 minutes left" when actual time left was only 3 minutes...

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится
  • Beautiful Pairs — Ok. Maybe the statement would be easier to understand with multisets instead of sequences?
  • Minimum Penalty Path — Ok. I think I know a solution with complexity O((N+M)log(MAX_COST)) but maybe I'm mistaken. Let's start with the answer 1023 (only 1's in the binary system). In linear time we can check whether A and B are connected (if not the print "-1"). For each bit from the most significant one we try to turn it off and check whether A and B are connected. If they are then we turn off this bit for ever — we can so we want to. implementation
  • Beautiful Strings — At first I thought it will be tedious to code but turned out to be nice and not complicated. My favorite problem from this contest.
  • King and Four Sons — Without any thinking I used the Wolframalpha, so I didn't like this problem at all. How can we obtain the formula with complex numbers? Can you give me some links or theorems about it?
  • Beautiful Segments — Ok but I personally don't like this kind of problems. More coding than thinking.
  • »
    »
    11 лет назад, скрыть # ^ |
    ← Rev. 3  
    Проголосовать: нравится +34 Проголосовать: не нравится

    King and Four Sons — in case you want to avoid "ouch, I tried Wolfram Alpha and it suggested some smart magic stuff" situation: we have dynamic programming DP[i][j] — in how many ways we can pick X among first i soldiers, so that X%4=j. We are interested in finding DP[A][0]. This DP is already fast enough for "small" subtask with A<=1000. Now what about making it work faster? OK, there are only 4 states in one layer of DP table, and transitions look cool and simple (either pick current soldier and move to (j+1)%4, or don't take it and stay and j), let's use matrix exponentiation!

    You have 4x4 matrix, so it is working fast enough, and thinking about it in terms of DP+matrix exponentiation sounds like a very classic idea.

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

    :)

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

We didn't understand your solution for last problem, but it seems that you don't need treaps and complex segment tree, if you notice that base array of segment tree is increasing, so you may use binary search.

As for feedback: I'd say that difference in difficulty between A-D and E was too big.

And it's quite strange to give 500 lines code in editorial and expect people to understand it