Wow, what a weekend! I hope you all have plenty of energy and solutions for all the problems you will see in coming contest.
Elimination stage of Yandex.Algorithm 2014 will start in eight and a half hours. All qualified participants can see it on the link. Round will last 100 minues, its top 30 participants will earn score points based on Gran-Prix 30 system. Finalists will be chosen based on the total score points earned throughout the elimination stage.
Good luck and hope to see you in Berlin!
How to solve E ?
Answer is always <=6 (because we can make every number in range 1..63 using values of 1,2,4,8,16,32), so you may set answer to 6 and try to improve it searching over all possible smaller sets of numbers in range 1..50.
Let us all contribute to write an editorial for each problem.
I start with problem A.
It is simple brute force time taken 3 ms memory 380 kb.
Make a recursive function which processes ith inpu. calculate new-sum based on current sum and current index. Then permute the digits of newsum and pass it as current sum with i+1 as current index.
My solution link.
B: Sort the ducks according to initial tone, then do DP trying to group two or three adjacent ducks and force them to have same tone. It doesn't make sense to make larger groups as they'll all be formed anyway, i.e. a group of 4 can be no better than 2 pairs.
C: Four sides a <= b <= c <= d can form a concave polygon if a+b+c>d and a != d. Sort the lengths and try all groups of 4 consecutive lengths.
D: You don't need to keep track of the actual values of both Wojtek and Tomek, just the current xor between the two values. Then do DP with state (current element, current xor).
For C, you mean a <= b <= c <= d and a!=d right?
Yes, you're absolutely right. Edited.
Why have I got -8?? I thought I had taken an initiative.
Okay. Moral : Dont run after the votes.
But I had not done it for votes. only problem is that my current contribution is -1 :\
In Gym: 2014 Yandex.Algorithm - Elimination Stage, Online Round 1
===
Добавил тренировку: 2014 Yandex.Algorithm - Elimination Stage, Online Round 1
Why can't we see the accepted solutions for the Yandex Rounds in the gym? Making them viewable could be beneficial to all, I think.
Disclaimer: though right now I'm a Yandex employee, I'm not a member of the organizing commitee.
AFAIK, to do so, Yandex must ask a permission from all the participants to publish their solutions, otherwise such publishment will be a violation of the law about personal data.
Well, it'd be possible to write in the rules that a participant grants Yandex such a permission, but it hasn't been done and now it can't be changed. That's all.
How to solve F?
That's exactly what I want to ask!!! BTW, Here's a short editorial for A-E in Chinese if anyone is interested. CLICK