Hello Codeforces.
The CF Round #356 will happen on 8-th June (exact time). You will get five problems to solve in two hours. The round is rated.
I encourage you to read other problems if you don't like or can't solve something. The scoring distribution will be announced.
MikeMirzayanov and GlebsHP make the round possible. Also, thanks for Radewoosh, kostka, johnasselta, AlexFetisov and (more to be added?) for their amazing help. And I want to thank my girlfriend because there would be no Limak without her.
It's my first standard round. Still, you should get nice interesting problems. You will meet Limak, who is usually a little polar bear. Here he is, preparing one of problems.
I wish you great fun and no frustrating bugs.
EDIT — It's recommended for both divisions to read the Interactive Problems Guide before the round.
EDIT2, SCORING
div2: 500-1000-1750-2250-2750
div1: 750-1250-1500-2000-2500
EDIT3
The editorial with codes is ready.
WINNERS, congratulations!
and Division 2:
Thank you all for participation and see you next time. And regards from Limak, a bear.
Looking forward to it! Such a long time since the last Div 1 round.
I am taking part in the College Entrance Examination in china.
But there is a conflict between the Examination and this contest.
But nothing is more important than become a purple boy.
So I give up the College Entrance Examination.
I have seen your big font several times, and I think it isn't beautiful...
WOW
He's just very afraid of gaokao (高考) )))
I apologize to all the English-speaking, below I will explain for Russian — that such GAOKAO
Поясню для тех, кто не в теме, китайский ГАОКАО (高考) — это аналог российского ЕГЭ, только намного круче и ответственнее. И он проходит единым экзаменом в один день по всей программе, а не как в России разбит на предметы. Китайские школьники сдают этот экзамен на стадионах, гигантских актовых залах, часто не в свое городе, чтобы не было возможности "договориться". По результатам набранных экзаменов идет распределение во вузам, техникумам, училищам. Вроде тоже самое, что и у нас в России, НО — всего 5-7% выпускников китайских школ имеют возможность продолжить учебу в учебных заведениях. Остальные — работать на фабрики, поля и улицы! Поэтому истерика при сдаче просто сумасшедшая. При этом корочки ВУЗа дают высокий шанс на успешное будущее. На фото — проводы выпускников на экзамен
Вот поэтому и я понимаю, почему КРУПНОПИШУЩИЙ нервничает ))
WOW,this must be your small ID.
Retarded
Don't curse.
Go take the exam
I can take this exam in one years.But the Codeforces Round #356 (Div. 2) just has a time.
Do you pay for the exam?
Don't need.
Bro Div. 2 Contests come out more than once a year; if you don't take the exam you're fucked
why you can comment on this blog during the math exam...
Math is too simple for me. I have solved all the problem quickly, and hand in my paper ahead of schedule.
Indeed the JIBACANYANG,Orz
You are a programmer AND you have a girlfriend!!!
you are my role model dude.
Who said that to you ?!
I have two girlfriends :p
do you like getting downvote?
do you like stay as " Newbie " !?
hopeless coders should stay newbie
"And I want to thank my girlfriend because there would be no Limak without her." congratulations on becoming a father!
Your comment is unbearable.
EDIT:
And I will kill you for this comment.I'm not going to help you with problems anymore. -_-Oh lighten up will ya
Just bear with it.
so his girlfriend is a polar bear?
If that is true and the son is also a bear.... well, father is the one who rises the child. Kind of.
No, a furry dinasor.
tourist 00
Why don't you thank that beautiful bear in your arms!?
Btw I congratulate you in-advance :D
If you look closely you can see that Swistakk is also holding a little bear , i guess polar bear is the most wannabe female in Poland.
Now I'm even curious what will grow larger: the rating of your comment or the rating of this blog post.
I and Errichto have closely observed that stout fight for two days xD.
I am also very curious if there is any relationship between the bear on your profile photo and Limak? :))
No. That photo was taken back in 2011, way before Limak which I don't know how arose.
More votes on your comment than Errichto's blogpost . Looks like you are distributing your chocolates to downvote his blogpost and upvote your comment. :P
You are my favourite problem setter! Too bad I will miss this round.
Looking forward to "Bear and Forgotten
TreeGirlfriend"! :)Anyway, this contest will surely be great as always. Thank you Errichto!
I wouldn't dare.
I don't know what are you saying.
Yes! The stories with Limak are always nice to read :)
Errichto be like, Petr's getting closer to me on the contribution list, lemme prepare a new round and make his mission impossible lol .
You always come with great problems, eagerly waiting for the round and hope I'll be able to participate, thank you .
You don't seem to know how big difference it is (currently between 162 and 175). Function contribution(upvotes on blog, upvotes on comments) is rather like a cubic root or logarithm rather than linear :P.
I'm looking forward to it. You wrote some very nice problems in the past. I hope there will be many algorithmic problems :D
Limak has a great subliminal message. Reverse it first: Kamil. It is the name of first Turkish polarbear manufacturer.
And its the name of the person who is preparing this round as well :)
Sen hala burdamisin la?
my 1st div1 participation , am I gonna go back to div2 ?? I hope not :p
anyway , I like blue more than pink :v :v and it was a nice try
You were purple before, not pink.
Errichto, Your Problem Statements are So clear to me. I Solved Your problems in Hackerrank too. Thanks You.
Good Luck & Have Fun!
We get it, you have a girlfriend.
Tbh, Limak scares me. The later problems turn out to be DPs, which are scary for me. The quality of questions are great, though.
That's GOOD
Guess there will be statement like that:
As Limak is a bear and he can't solve the problem by himself, so he ask you for help. Can you help him?
i think it's a Plan to Strengthen relations Between Polar Bears and Humans
or maybe the polar bears are some kind of alien and Errichto is one of their top spies sent to invade the earth he has already attacked Swistakk (notice the polar bear in his hands.) soon the polar bears might invade the earth. that would be unbearable
That's it, obviously!
This may be strange, but I'm becoming a fan of Errichto, his posts, comments and problems. :)
And he's quite handsome on his profile photo as well. <3
It's going to be my first Div. 1 round ever, so let's see if I'll join your Errichto fan club after that :D
Yes he is indeed handsome!
Hope you are female
You guessed correct
Wish me good luck guys I really feel like I'm gonna make it!!
What do you do... 50 push-ups for every Accepted ?
I'm wondering if this little polar bear is preparing a problem about powers of prime numbers ? :p
let's hope not
Wow, you guessed it right. Powers problem and primes problem.
and he solved none of them
ya i got good prediction :D , but bad rating :( ... but good prediction :D !!!
i really hope that the pretests would be strong enough , because it's sucks when you spend a lot of time working on Problems and gets the same position of someone spent all the time refresh room page to hacks someone else solutions.
Hey, hacking is hard work! It's much harder to get 500 or 1000pts by hacking than solving a problem. Besides, once you get the hang of it it's super fun. Also, it's good to learn to code without relying on strong outside tests if you're ever gonna do coding outside of competitions.
[Deleted]
Do you prefer it to fail on final tests?
It's locked, at least he can live as happy for more 15-20 minutes :P
Errichto You are merciful and you'll don't set tricky test case as a final test ...-_-... and maybe not :P
I suppose we all would rather to be hacked way before the round ends, so we could fix it unless you have already locked the problem (which is a lost case anyway).
exactly , I think hacking is a good thing
Hope I can get my first 4/5 at your round, after 4 unsuccessful try -_-
What do you mean by "your first standard round" — were the others prepared by you a non standard?
He has prepared Educational Rounds, VK Cup, India Hacks, Thanks-Round. Go to Problemsetting tab. So this is his first Standard Round.
It's fun that the last CF Round I took part in is on the Chinese Spring Festival, and this one is on the Dragon Boat Festival.
Thumbs up for those playing cards from World Finals 2012! :)
It's recommended to read the Interactive Problems Guide prepared by Mike Mirzayanov.
:( :( :( i was expecting some normal problem
Don't worry, you will get four normal problems.
Maybe four is not enough for him..
wow, you can feel me my bro -_-
Isn't the Interactive Problems are suitable for Educational Round . ( just my thought )
So still not so standard round :P
i think the second problem will be interactive as second card is hidden in the image .
The interactive problem will be both for Div. 1 and Div. 2, according to the main post. So, it cannot be the Div. 2's second problem.
So it is not a standart round as well :p
Having interactive problems adds to fun of Competitive Programming. :)
It's about time I left the green phase without a second comeback
Good luck everyone
Good luck, I hope that too for myself !
Oh, div2 C scores 1750, I have a bad feeling..
C is easy just like typical rounds. But D and E, too difficult for me. the 5th unsuccessful attempt to get a 4/5.
Feels like experimental round, poor you Errichto
Bad feelings :(
I had great fun solving Div2/C. Thanks for the nice problems, Errichto!
My solution to problem C.Whenever i tried to submit it , my browser get stuck on the same page. More interesting part is that submitting this solution to any other problem results the same.
Your solution says 2 is composite
Why am I getting WA for Div2 C?
int sieve[1000];
set st;
bool isPrime(int num) {
}
int main() {
}
Consider number 74 = 2 * 37 for example.
i got stuck on C because i didn't take perfect squares in account
It wasn't covered by pretests.
How to solve Div 2 — D?
What I coded up and finished a bit after the end was this:
First, generate first few terms of sequence, and oeis the rest: http://oeis.org/A055402
Then hardcode those values, and for a given m pick the best value you can. Call this best value v. Decompose v into its cubes, then(from highest to lowest) try incrementing each cube(n^3 becomes (n+1)^3) while making sure the sum doesn't exceed the given m. Then output this sum. I didn't get to submit, so I'm not sure if this is completely correct
Oh, I knew I weren't the only one who tried to look up this very sequence in OEIS.
Came up with almost the same approach and got WA 4 (see 18325136).
According to me , the 3rd problem should be able to differentiate between coders and the number of people who solve should be <=700,800. That was definitely not the case today.
2 of my submissions were submitted at the exact same second . Can one of these be removed while considering penalty >.<
First one will be skipped
Both gave me a WA >.<
Problem Div2 C was really easy for hacks, because it had week pretests! For example, I hacked two people using "94" as a hack because they didn't check for 47. Another hack was "49", so no perfect squares.
TNX for your perfect contest and fast editorial guys.
After try spending 1 hour and 45 minutes on Div1-B:
I'll need to train harder next time...
Dont Worry the number of the contests coming are more than those which have passed :) All of us needs to train harder :)
I couldn't think of a legit solution either...
I ended up using a really sketchy solution in which I check the 500000 numbers below m and take the optimal value (can't prove it's correct, let's see if I AC).
edit: darn got WA
Did the same thing, WA on test 20 :|
Why didn't you try div1-C then?
Spent whole contest trying to solve B and then solved C in 20 minutes after the contest....
Errichto when can we expect system testing? In 5 minutes or in a hour?
in 2 minutes :D
А все потому что закончились шишки и приходится курить табак((((( никогда не курите ребята!! никотин вреден для мозга я тому пример седня!!!(((
I want to know why my solution got run time error for div2 b. can anyone pls take a look? link to submission Thanks
You are reading more input values than you should/have.
I completely forgot to input m as a long long for problem D.
At least my solution probably had a bug somewhere else!
Again, A massive gap between Div.2 C and Div.2 D ...
I think it's not a good problem set.........No layering
Вобще блин так растроился(((( Теперь рейтинг точно упадет(((( Нада к Майклу в сазанку ехать он стопудово надрочит меня задачки щелкать на раздва(((
Ребята поддержите меня пожалуста мне грусно!!(((((((
Желаю, чтобы если и падал, то только рейтинг, а не как это обычно у спортсменов бывает
Это да у нас в качалке на одного гантеля упала пришлось скорую вызывать(((( но он сам дурак знал же свой рабочий вес но нет мгновено шварнегром стать решил. но все равно жалко пацана(((
I managed to find number of cubes in D and minimal volume. Was it the right way or this information is useless?
Forgot «47» in C... short div[] = {2, 3, 4, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49} Frustraiting...
Same here, I omitted 19. Really infuriating...
That kind of information you could just google: https://www.google.ru/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=primes%20less%20than%20100
That's why you just write a prime sieve and let the computer do it for you, it won't forget anything :)
Can anyone please explain how to obtain the 0.916666666667 in the 3rd sample test of problem D?
If I remember correctly, you should twice use BCD in city 1. If you get distance 0 then you win immediately. Otherwise, for sure Limak moved between cities 2 and 3 — guess one of them.
hacked two solutions in div2 C and then realized that i was screwed ! 25 and 49 will hunt me down tonight . :(
Now-a-days contests have become extremely rare. And then to provide a contests like today is so disappointing...To do so much upsolving preparing for contests..for what? An interactive problem that almost 70% of the candidates can solve? Noooo...This is just not done..
Speed matters too you know !
Absolutely....I wasted too much time on C and got stuck on 1200 position...if i would have solved it faster...my position would have been under 500 as I had a lot time for C :(
You could also use hacks on Div2 C even if you had lost some time, there were many participants with wrong code because the pretests were weak. After submitting my first 3 problems I ended up being somewhere near place 250, but with 3 hacks I got to the place 47 and thus I am Div1 now :)
If you would've solved problem D, you wouldn't be complaining. Keep upsolving, and you will keep do better and better :)
Thank you for a wonderful round!)
Thank you very much, Errichto! I loved the problems!
I came up with the efficient approach for C right after the contest ended and it took me some 10-15 minutes more to code it, but I enjoyed the contest nevertheless :D
my eyes almost got cancer from debugging this.. only realizing my l and j is swapped after the contest is finish..
Your fingers deserve cancer for writing this.
What about my fingers? =)
18321088
Very mean. Maybe you're not handsome after all.
nobody deserves cancer :)
Then , see this 18323430
Respect for this guy :D
I felt like this Code won't pass when I was looking for hacks.
But I gave up on reading this code, but soon I realized it was a big mistake as the test was pretty trivial, I think he mistyped the last else block, but how can he ! He must be god or something!
WTF
18317238
I hate 93 :(
For me polishing E was so immersing, that I've forgotten (but coded) to submit A. Things happen.
The waiting for rating change has just begun.
...and it's over
Thank you for participation and for kind words. Also thanks for bad words (as long as it's something constructive/reasonable). Btw. div2 participants can now check again a picture from the blog. Do you know why is there one card hidden?
Congratz for the contest, it was really good in my opinion (maybe difficulty raise was a little too high between div2.C and div2.D, but still I really enjoyed this contest).
Because you hided it??
Because
It's one of samples in div2-A and the hidden card should contain a number 1. But there are no cards with this number, there are only 2,3,...,10.
Awesome contest!!! :D Solved 3. Coded brute force dp for 4th one but failed to find a tiny bug in time which was resulting in wrong answers for the tescases :/
My view of the points system this round 500 — 750 — 1250 — 2500 — 3500
Honestly, I miss the dynamic scoring.
How would it affect your position?
(but yeah, I see that the difference between C and D was too big)
it was tooooo big :(
18329338 -_- It gives a proper output in CodeBlocks but wrong in CodeForces !!! But why ?
http://mirror.codeforces.com/contest/680/submission/18337493 http://mirror.codeforces.com/contest/680/submission/18337516
Array overbound gives unexpected result.
a moment of silence :D
why?
This contest was outstanding.
It's the first time I solve C during the contest and I turned green :)
thank you Errichto.
hope to see you make new contests soon. :)
Awesome round, especially Div2/C. Looking forward to seeing more interactive problems in the future! :)
Наконец-то фиолетовый апнул, найс раунд.
Very interesting round! The most interesting round in a while for me. Thanks for the interesting problems! Wish I could've solved div 1 C :/
I think Div 1 C/D may be easier than Div B :)