Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

### MikeMirzayanov's blog

By MikeMirzayanov, 11 years ago, translation,

Hello!

This contest has been prepared by Artem Rakhov and other participants of Petrozavodsk Training Camp from Saratov State University. We stopped solving problems of the camp, missed the lecture by Vitaly Goldstein (do not be angry, Vitaly), but the round has been prepared and we are waiting for you - the participants.

Happy hacking,
MikeMirzayanov and team Codeforces

UPD:

• +47

 11 years ago, # |   +4 Thanks for the nice problem C
 11 years ago, # |   0 What is final test 16 for B?
•  11 years ago, # ^ |   0 you can see(or will can some later) tests by clicking to ID in "My submissions"
•  11 years ago, # ^ | ← Rev. 2 →   0 It is so strange:Test: #16, time: 50 ms., memory: 2688 KB, exit code: 0, checker exit code: 2, verdict: WRONG_ANSWERInput509149Output1Answer509149 1Checker Logwrong output format Not sorted and uniquedWhat's wrong with this answer? It is looks like all is ok (sorted and unique)
•  11 years ago, # ^ |   0 your output is not equal answer
•  11 years ago, # ^ |   0 I just didn't get report structure in first moment.
 11 years ago, # |   +5 Can someone please explain the solution for problem E?
 11 years ago, # |   0 Can any one explain the logic behind problem C ?
•  11 years ago, # ^ | ← Rev. 3 →   0 For every tree check how long will first and last trees be if current(We will name this height - len) tree is unchanged. If it greater 0 increase a[len]Answer is n-max(a[len])
•  11 years ago, # ^ |   0 I think u need 1 more revision...I think u missed a "be" after "last trees"  ...and what is len?
•  11 years ago, # ^ |   0 Hm, Is it understandabke now?
•  11 years ago, # ^ |   0 Fixed the height of the first tree all the others are defined.So, for each tree you check which height of the first tree would keep it unchanged.Choose for the first tree the height that satisfies more trees.
•  11 years ago, # ^ |   0 Why the first tree is so special...?
•  11 years ago, # ^ |   0 First tree is most short.
 11 years ago, # |   0 I am so much depressed .... I knew the logic for the Tree problem... but don't know why the hell I couldn't code it.. :(
 11 years ago, # |   +3 Are there going to be more competitions soon?
 11 years ago, # |   0 All of my accepted solutions gave runtime error in the final testing :(Please tell my error...And my solution for C got WA for pretest 6. I used the same algorithm as above.
•  11 years ago, # ^ |   +3 In Problem A you use array a with size 100 --> char a[100]but you must use char a[101], because the maximum length of string is 100 and the end of this string must fill by 0.sorry for my poor english.
•  11 years ago, # ^ |   0 ah great... an extremely stupid mistake to make... any idea about B?
•  11 years ago, # ^ |   +3 you must initialize the arry a with false. like this:memset (a, false, sizeof a);because your array is local and maybe not have false value. therefore the primes are incorrect and maybe have 0 value or no primes have value greater than n.
•  11 years ago, # ^ |   0 Problem A: try to put a[101],because strlen("dejap") = 5, and you string is 0..4. So when there is a word of 100 chars your array cant access a[100] because it contains only 0..99.Problem B: try to declare arrays out of main function (global)Hope it helped.
•  11 years ago, # ^ |   0 How will declaring arrays out of the main function help? I haven't tried it out yet but still... how should that make a difference?
•  11 years ago, # ^ |   0 Sometimes when there are big arrays in functions it generates stack overflow... It is better to declare static array which is initially filled with zeros. So it is safer. My compiler cant even compile your code until I put that 1M array out of main.Hope it helped. :)
•  11 years ago, # ^ |   0 Thanks... the solution passed!
•  11 years ago, # ^ |   0 I am happy to help you, I learned that five days ago on some other competition.
•  11 years ago, # ^ |   0 In problem B u r trying for a loop of O(10^12) thats an  obvious reason for crashing ur program.
•  11 years ago, # ^ |   0 The time complexity of my program is O(nlogn). The sieve (the only thing which you could be talking about) has complexity of O(nlogn).
 11 years ago, # |   +3 Who can explain the main idea to solve E?
 11 years ago, # |   0 goh tu in emtehanu!
•  11 years ago, # ^ | ← Rev. 3 →   +2 khob una Parsi nemifahman , ma ke mifahmim.
•  11 years ago, # ^ |   +3 mikhastam bebinam chan nafar irani darim!
•  11 years ago, # ^ |   0 There are lots of us.خیلی زیادیم
•  11 years ago, # ^ |   +3 می تونم اگه بخواین لیست ایرانی ها رو براتون بفرستم
•  11 years ago, # ^ | ← Rev. 2 →   0 خیلی کار خوبیهدستتون درد نکنهفقط لطفا اینجا وسط کامنتها نذاریدتو قسمت بلاگ بنویسید
•  11 years ago, # ^ |   0 salammnm migm farsi type konimchtor ros ha rosi minevisan
 11 years ago, # |   0 No contests coming up soon?