### Ripatti's blog

By Ripatti, 10 years ago, translation,

Hello everyone!

That is Codeforces Round 139 for the second division only. Members of the first division can participate out of competition.

Round is prepared by Ripatti , Gerald , Delinur.

We will use dynamic score system. Problems will be ordered in order of expected increasing difficulty.

Good luck!

UPD. For technical reasons round delays in 15 minutes.

UPD2. Testing is complete. Winners:
1. wccy
2. ttl
3. shubhanshu
4. Atarashi_Ako
5. dvylfz921

2 members solved all 5 problems.

English editorial will be tomorrow. You can try to understand russian editorial.

UPD3. English editorial.

• +88

 » 10 years ago, # |   -23 and problems score???
 » 10 years ago, # |   +18 Time for the contest is 23:30 in China. It's toooo late
•  » » 10 years ago, # ^ |   +7 Better than no contest, right?
 » 10 years ago, # |   -17 Missed the registration. Didn't know contest was today. Quite quick back to back to contests.
 » 10 years ago, # |   0 I wonder what is the solution of E. Anybody write in short please.
•  » » 10 years ago, # ^ |   +9 brute force + OEIS
•  » » » 10 years ago, # ^ |   0 what do you mean by OEIS?
•  » » » » 10 years ago, # ^ |   +3 http://oeis.org/ You can find many integer sequences there
•  » » » » 10 years ago, # ^ |   +3
•  » » » » » 10 years ago, # ^ |   0 thank u for the help. Do you mean the solution is that first brute-force some result and then search the sequence on OEIS?
•  » » » 10 years ago, # ^ |   0 You are searching for 1, 2, 4, 6, 12, 16 or other sequence?
•  » » » » 10 years ago, # ^ |   0 Not this sequence, Okay, I may misunderstand the method
•  » » » 10 years ago, # ^ | ← Rev. 2 →   +15 There are only 39 numbers in OEIS, so I think the problem is Unsolvable with N = 40 and My solution got Wrong answer on test 40 :((.
•  » » » » 10 years ago, # ^ |   +2 40th Mersenne Prime :/ http://mathworld.wolfram.com/news/2003-12-02/mersenne/
•  » » » » » 10 years ago, # ^ |   0 Thank you!
•  » » » » 10 years ago, # ^ | ← Rev. 2 →   +6 You can you wiki instead. Mersenne_prime And it equals to 2 ^ 20996011 — 1.
•  » » » » » 10 years ago, # ^ |   0 Thank you!
 » 10 years ago, # |   -12 I finished Div.2 C problem just 5s late... Bad luck...
 » 10 years ago, # |   +27 "It started like a Cheetah , but now is as slow as a snail "- yes , the system testing
 » 10 years ago, # |   +19 Solutions to A and E of wccy and wzc1995 are ditto same.
 » 10 years ago, # |   -7 So slow.. =/
 » 10 years ago, # |   +1 Although my program of problem C is passed by the system test, my total scores in the scoreboard does NOT add the score of the problem C as well as my new rating. Please recalculate my score and new rating.
 » 10 years ago, # |   +4 For this 139 competition, I receive notification on E-mail 4 hour after contest!
•  » » 2 years ago, # ^ |   -8 nice
 » 10 years ago, # | ← Rev. 3 →   +11 225D - Змейка In the problem was said that the snake's head is "1", the second segment is "2", and so on to k. But in the sixth test the snake starts from 5 to 9. Where is the first part from 1 to 4?
•  » » 10 years ago, # ^ |   +12 Because some large test case may be not display completely
 » 10 years ago, # |   0 I'm having some troubles generating the K-bonacci numbers on problem B. I tried to just implement the recurrences describe in the problem statement, but I suppose I have a bug somewhere. Can anyone help? Thanks. typedef long long i64; i64 K; i64 S; i64 F(i64 n) { if (n >=1 && n < K) return 0; if (n==K) return 1; i64 ans = 0; while(n > K) { ans += F(n-1); --n; } return ans; } int main() { #ifndef ONLINE_JUDGE freopen("139_B.in","r", stdin); #endif cin>>S>>K; for(int i = 1; i <= 15; ++i) { cout<
•  » » 10 years ago, # ^ |   +4 while(n > K) is wrong. You should add every F(x) for x in [n — K — 1, n — 1].
•  » » » 10 years ago, # ^ |   0 Thank you for the help. I changed the loop to be like this, but I never get 3 as one of the K-bonacci numbers when using K=2. However, according to example 1, 3 is supposed to be one of the numbers.  FOR(x,n-K-1,n-1) { if (x < 0) break; ans += F(x); } At any rate, I don't want to waste anyone's time here, so I will try to study some other solutions to see if I can use them as a reference. Thanks very much again for your help, I really appreciate it.
 » 10 years ago, # |   0 Can anyone tell me what is the relation between Mersenne primes and the answer of Problem E???? I mean what is the proof that (2^(Mp-1)-1) don't have an answer to the equation??? I will appreciate a proof or a reference to be read! ;)