Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

### Yury_Bandarchuk's blog

By Yury_Bandarchuk, 5 years ago, translation, ,

Hi, Codeforces.

I am happy to say that Codeforces Round #332 (Div.2) will take place November 20th at 19:35 MSK. This is my second Codefocres round and I hope not the last.

Thanks a lot to Dmitry Rozhkov (RDimon2912) for solving these problems, also thanks to Vlad Vishvevski (Vladik) for cool pictures. I'd like to thank Gleb Evstropov (GlebsHP) for help in round preparation. And, as usual, big thanks to Maria Belova (Delinur) for statement translation and to MikeMirzayanov for such great systems as Codeforces and Polygon.

The duration of the contest is two hours. What about tasks, it's not a secret that you can find Spongebob's pineapple and a restaurant with strange name "Crasti Crabs", cosy beach and Jellyfish Meadows on the bottom of the ocean. Spongebob and his friends need in your help, help them!

I strongly recommend you to read all the problems and, probably, you will find something right for you.

As usual, scoring distribution will be announced later.

UPD: Score distribution — 500 — 1000 — 1500 — 2000 — 3000.

Editorial.

Div. 2 Winners

Div. 1 Winners

Congratulations!

• +415

 » 5 years ago, # |   +167 First problem be like: Spongebob and Patrick like to light fire under the ocean when it's cold! ...
•  » » 5 years ago, # ^ |   0 And The Second Problem Like This...
•  » » 5 years ago, # ^ |   0 Spongebob was developed for mentally retarded children..
•  » » 5 years ago, # ^ |   0 There are many hacks in this contest.
•  » » » 5 years ago, # ^ |   +6 And there are many wrong answers on main test too I didn't join the exam but i see "Wrong Answer on Main Test" when i check somebody's wrong code...
 » 5 years ago, # | ← Rev. 3 →   +38 I won't see SpongeBob anymore if I lose rating in this contest :/** And you're the reason K0T :'( **UP: I won't see SpongeBob anymore :/
•  » » 5 years ago, # ^ |   +2 And you're the reason Sa1378 of your rate loose!
 » 5 years ago, # |   -10 aye aye captain!
 » 5 years ago, # | ← Rev. 2 →   +33 Good way to celebrate children's day :D
 » 5 years ago, # |   0 What a nice idea. Good luck to everyone
•  » » 4 years ago, # ^ |   0 Good luck
 » 5 years ago, # |   +7 Good Luck All ^_^
 » 5 years ago, # | ← Rev. 2 →   0 I love Patrick . He is really fun so I think this contest will be really funny and I wish good luck to everyone.
 » 5 years ago, # |   -13 is it only me who hasn't seen SpongeBob? :P
•  » » 5 years ago, # ^ |   -14 you are not alone :p
•  » » 5 years ago, # ^ |   -19 no, me too
 » 5 years ago, # |   -16 Not sure if it's codeforces or cartoon network
•  » » 5 years ago, # ^ |   -12 Did you mean Nickelodeon? :P
•  » » » 5 years ago, # ^ |   -16 yup my mistake :p , i'm not a big fan of cartoons .
•  » » » 5 years ago, # ^ |   0 LMAO
•  » » 5 years ago, # ^ |   +3 It is Codeforces just probblemsetters adding this pictures(or cartoons pictures) just for fun.It is more enjoyable for coders!
•  » » » 5 years ago, # ^ |   +5 Especialy when you have to wait longer to download 1st problem
 » 5 years ago, # |   +15 i hope short problems statements :)
 » 5 years ago, # |   +5 Time shedule change. Today's contest time 19.35 . I hope next contest time 19.35(1/2).
 » 5 years ago, # | ← Rev. 2 →   +19
•  » » 5 years ago, # ^ |   0 Never go full retard.
•  » » 5 years ago, # ^ |   0 ahahaha serius problem.
•  » » 5 years ago, # ^ |   0 :D
 » 5 years ago, # |   0 I love Spongebob and I hope " I love this contest " too :D.
 » 5 years ago, # |   +37 Two Future Contest already Announced , So Nice :)
 » 5 years ago, # |   -20 How can I give problems on codeforces?And how can I know my problems to be selected?
 » 5 years ago, # |   -7 Thanks to autors for Round!!! Good luck all contestants
 » 5 years ago, # |   0 Yeah! love spongeBob, looking forward it!
 » 5 years ago, # |   +10 Spongebob is love, Spongebob is life. This contest's gotta be good. Someone dare to say "I hope Spongebob dislikes math?" (Downvotes swarm incoming...)
•  » » 5 years ago, # ^ | ← Rev. 2 →   +5 If he dislikes maths, he'd ask you to solve his math problems. If he loves maths, he'd be too busy and he'd ask you to solve his math problems. It's maths either way.
 » 5 years ago, # |   -31
•  » » 5 years ago, # ^ |   +24 Oh God... Codeforces should restrict such big images.
 » 5 years ago, # |   +9 Yah :) A coding month :) Just love it :)
 » 5 years ago, # |   +1 Have a nice evening and good luck everyone~~~
 » 5 years ago, # |   -6 if you see this coment and you will have a increase of rating！you Konw I am lucky star!
•  » » 5 years ago, # ^ |   0 If not then better rating next time. :)
 » 5 years ago, # |   +8 Wish Mr.Plancton doesn't have a evil plan for your rating! good luck all CF members! :))
•  » » 5 years ago, # ^ |   +4 Are you Bohdan Pryshchenko or his opponent?
•  » » » 5 years ago, # ^ |   0 Unfortunately, I'm not Bohdan Pryshchenko and also i'm not his opponent! I even don't know him, and I chose this handle because I recently got to know this site, and I don't have an idea for a cool handle, so I choose this (I see I_Love_Tanya_Romanova in the top contributors list)!
•  » » » » 5 years ago, # ^ |   +4 I mean Div.1 in new profile :)
•  » » » » » 5 years ago, # ^ |   0 Let's see if I reach div1 :|
 » 5 years ago, # | ← Rev. 2 →   +1 is it spongebob photo album or round announcement ?
•  » » 5 years ago, # ^ |   0 I guess it's spongebob photo album :)))P.S: plz correct "spongebob" in your comment :D
 » 5 years ago, # |   0 Why late 5.00000 minutes.
 » 5 years ago, # |   +10
•  » » 5 years ago, # ^ |   0 MVP?
•  » » » 5 years ago, # ^ |   +5
•  » » » 5 years ago, # ^ |   0 Obviously, it is Minimum Viable Product
•  » » » » 5 years ago, # ^ |   0
 » 5 years ago, # |   0 what about scoring distribution?
•  » » 5 years ago, # ^ |   +10 As usual, scoring distribution will be announced after the contest.hahaha.......
•  » » » 5 years ago, # ^ | ← Rev. 2 →   +5 whisper: if you change language you will see.
 » 5 years ago, # |   0 Forgot to register, NOOOOOOOOOOOOOOOOO!
•  » » 5 years ago, # ^ |   +8 wish you a high rating in this contest :D
•  » » 5 years ago, # ^ |   0 You do it wrong... nooooooooooooooo
 » 5 years ago, # |   0 What is scoring distribution?
 » 5 years ago, # |   0 Spongebob and his stupid friend Patrik are here to challenge us quite interesting!!! :-)
 » 5 years ago, # |   0 When do you want to announce the scoring distribution?contest is starting :|
•  » » 5 years ago, # ^ |   +7 It was published in Russian version of the post, but the author forget to add it to English one.
•  » » » 5 years ago, # ^ |   -18 When are you going to remove Russian Codeforces?
•  » » » » 5 years ago, # ^ |   0 Why would we do this?
•  » » » » » 5 years ago, # ^ |   0 To save the amount of work and reduce the level of confusion. Besides I've heard some time ago that Russian CF was supposed to be removed.
 » 5 years ago, # |   0 What was hacking test of prob B?
•  » » 5 years ago, # ^ |   0 wish I knew it :(
•  » » » 5 years ago, # ^ | ← Rev. 3 →   0 It's difference between Ambiguity and Impossible. Example3 31 2 13 3 2Will give Impossible but your code maybe giving Ambiguity.
•  » » 5 years ago, # ^ | ← Rev. 2 →   0 2 21 21 1->Possible1 1 2 21 11 2->Impossible
•  » » 5 years ago, # ^ |   0 I think if the case is "Ambiguity" and "Impossible" at the same time, it should be "Impossible".
•  » » » 5 years ago, # ^ |   +4 Actually I just realized that 5 5 1 1 1 1 5 5 5 5 5 5 should give "Possible". I'm printing "Ambiguity" even if the b sequence doesn't use the ambiguous key.
•  » » 5 years ago, # ^ | ← Rev. 2 →   +1 In that case when answer is possible but you have printed Ambiguity even it is not appeared in B.3 33 2 32 2 2
•  » » 5 years ago, # ^ |   0 I used this 3 3 1 2 2 1 2 3 Most of the codes (including mine) give "Ambiguity". But the correct answer is "Impossible".PS — I hacked 3 codes using this test case.
•  » » 5 years ago, # ^ | ← Rev. 7 →   0 Edit: C has more successful submissions then B :| :|
•  » » » 5 years ago, # ^ |   0
•  » » 5 years ago, # ^ |   0 I was hacked for my B with a test case similar to this 3 2 1 1 2 2Answer is clearly 3 3But due to a previous wrong implementation I was looking for duplicates in f-array. That gave me a hacked solution.
•  » » 5 years ago, # ^ |   0 3 3 3 3 1 3 3 2
•  » » » 5 years ago, # ^ |   0 Answer?
•  » » » » 5 years ago, # ^ |   +1 Impossible
 » 5 years ago, # |   0 Anyone else got WA #16 for E? I am really curious about that test case.
•  » » 5 years ago, # ^ |   +9 Orz
 » 5 years ago, # |   +3 Is D all about a cubic equation?
•  » » 5 years ago, # ^ |   0 Yup. Wish I clicked on it sooner. I clicked on it literally 2 minutes before end. Couldn't solve C, or B.
 » 5 years ago, # | ← Rev. 2 →   0 Solved the problem D 2 sec late hope my solution idea will be wrong. Edit: Solution is wrong:)
 » 5 years ago, # |   +52 This always freaks me out before realizing that System Test hasn't got to my correct submissions yet.
•  » » 5 years ago, # ^ |   +3 Yes this happened with me too. :D
 » 5 years ago, # |   +14 after this contest i will never see Spongebob :((
 » 5 years ago, # |   +33 Nice problems, superfast editorial and superfast system testing! This contest can't get any better! :)
•  » » 5 years ago, # ^ |   +30 Thank you so much!
•  » » » 5 years ago, # ^ |   +6 The first problem is what is needed. You first submit obvious solution and then realise, that there are tricky situtaions.
•  » » 5 years ago, # ^ |   +37 Thanks to GlebsHP too. :)
•  » » 5 years ago, # ^ |   0 I agree! I could not catch the contest in time and now I feel so bad that I missed solving this interesting set on time. Chapeau K0T!
 » 5 years ago, # |   0 Problem B isn't written well, I don't understand it until now
•  » » 5 years ago, # ^ |   0 No it's written perfectly well, and it's crystal clear.
•  » » » 5 years ago, # ^ |   0 Number of AC solutions in B indicates that there is something wrong only 1100 AC solutions in B is a very small number compared to previous contests
•  » » » » 5 years ago, # ^ |   0 It's because the pretests were a little weak.
•  » » » » 5 years ago, # ^ |   0
•  » » » » » 5 years ago, # ^ |   0 Well, counting the solutions AFTER the contest (i.e. all the people who fixed their solutions and submitted) is really dumb.Go here and turn unofficial results OFF, and you will see that B was solved by 984 participants while C was solved by 1043 participants.Indeed, the rule about Ambiguity > Impossible was not clear.
•  » » » » » » 5 years ago, # ^ | ← Rev. 2 →   +3 The statement says "(...)If there are multiple suitable sequences ai, print "Ambiguity".(...)"When the answer is "Impossible" the number of suitable sequences is 0. My first solution for B was hacked but I must admit that the statement was clear, the problem was my lack of attention.I think that the low number of AC's was due the difficulty of the problem, it's harder than expected for B.
•  » » » » » » 5 years ago, # ^ |   0 Sorry, I didn't know that. After all, I am a mere Pupil. :)
•  » » 5 years ago, # ^ | ← Rev. 2 →   0 f is a function means that the ith f equals to f(i),so bi=f(ai). And I was confused too. But problem B is nice.
•  » » 5 years ago, # ^ |   +3 It's well written. It's just tricky. I got hacked and I couldn't figure out my mistake during the contest. Turns out it is wrong to immediately print "Ambiguity" after finding more than one such index. This is because at such point, it is still possible for the answer to be impossible, i.e. there exists no such sequence a.
 » 5 years ago, # | ← Rev. 2 →   0 Got Runtime Error in test case 33 for Question C. But, my program is able to solve problems for higher n without runtime error. How is it possible? http://codeforces.com/contest/599/submission/14373631 Sorry found the mistake.
 » 5 years ago, # |   +1 Interesting round! "weak" pretests, many hacks at the end :)
 » 5 years ago, # |   -25 Bad contest :|
•  » » 5 years ago, # ^ |   0 Good contest, fun and educational.
 » 5 years ago, # |   +1 But...But anta last visit at 25 hours ago
•  » » 5 years ago, # ^ |   0 Codeforces API?
 » 5 years ago, # |   +12 why is still system testing for me and can't submit anything, but number of accepts is getting more and more?
•  » » 5 years ago, # ^ |   +6 You are not alone, so silly things are happening right now..
•  » » » 5 years ago, # ^ |   0 WTF???Ratings changed but I still can't submit...And also there isn't any friends rating changes in standings.
•  » » 5 years ago, # ^ |   0 Mine is still at system testing too.
•  » » 5 years ago, # ^ |   0 I have this issue too, MikeMirzayanov would you please fix this?
•  » » » 5 years ago, # ^ |   0 wna kman ya 3m mahdy :/
•  » » » » 5 years ago, # ^ |   0 hhhhhhhh
 » 5 years ago, # | ← Rev. 4 →   0 For problem D for(i=2; i<10e6; i++) : WA65 for(i=2; i<2*10e6; i++) : AC (after contest):( my calculations gave cube_root(x); it turned out to be 2*cube_root(x);
•  » » 5 years ago, # ^ |   0 you must do it to 1442251, because it can be ans for x around 1e18
 » 5 years ago, # |   +3 A gray participant who solved all 5 problems. Just wow.
•  » » 5 years ago, # ^ |   0 Div1 player dude
 » 5 years ago, # |   -24 Didn't expect such a good problemset from the fan of the cartoon for idiots.I had a really good time, thank you! Look forward to see your next contests!
•  » » 5 years ago, # ^ |   0 Cartoon for idiots? I loved Sponge Bob when I was a kid.
•  » » » 5 years ago, # ^ |   -11 So what?
•  » » » 5 years ago, # ^ |   +23 I loved Sponge Bob when I was a kid. It means you don't love him anymore? How could you??
•  » » 5 years ago, # ^ |   0
•  » » 5 years ago, # ^ |   0 Agree, Grendizer FTW!
 » 5 years ago, # |   +4 D was much easier than B & C.
•  » » 5 years ago, # ^ |   0 B is easy too, C is the bomb.
•  » » » 5 years ago, # ^ |   0 B was easy but tricky. D had no tricks ;)
•  » » » » 5 years ago, # ^ |   0 A,B,C,D easy, E hard
•  » » » » 5 years ago, # ^ |   0 C was the trickiest of b,c,d. Spent all my time on it, and kept coming up with test cases where my solution would fail,before time was up.
 » 5 years ago, # |   +3 I'm sad to get WA on test 65. I'm extremely sad that there isn't test 66 after I accepted it! :(
 » 5 years ago, # |   +6 Congratulation rakhashov.maksat for solving all five problems. From today you are my new inspiration :)
•  » » 5 years ago, # ^ |   +18 From today (s)he is my favorite troll :)
•  » » 5 years ago, # ^ |   0 I am also surprised to see his ranks. How it possible ? In CF round 325 he was newbie, But in 332 he collects 535 rating. What occurs in last 7 contest for him ?
 » 5 years ago, # |   0 easiest contest i ever solved
 » 5 years ago, # |   0 That moment when u are confused about ur own solution's time complexity...Submitted it assuming it to be O(sqrt(x))(expecting TLE)but it was O(cuberoot(x))a confusing loop:for(i=1;i*i<=x && (x/(i*(i+1)))>=(2*i+1);i++)
•  » » 5 years ago, # ^ |   0 (x/(i*(i+1)))>=(2*i+1) ---> x>=(2*i+1)*(i*(i+1)) Now it's not confusing ;)
 » 5 years ago, # |   +18 Yesterday I was 16 and today I am 17. Yesterday I was expert and today I am candidatemaster. Come on!
•  » » 5 years ago, # ^ |   +4 btw nice graph ;)
 » 5 years ago, # |   0 On the proble C: Tests was less than need. That is cod TL 14376989
• »
»
5 years ago, # ^ |
0

That is generator which it kod get TL

# include <bits/stdc++.h>

using namespace std; int main() { int n = 100000; cout << n << "\n"; cout << n << " "; for(int i = 2; i <= n; i ++) { cout << i — 1; if(i != n) cout << " "; } cout << endl; }

 » 5 years ago, # |   +4 why it's "Practice is allowed only for finished and unfrozen contests"?
•  » » 5 years ago, # ^ | ← Rev. 4 →   0 I have this problem too . what should we do !? UP : It's fixed now (at least for me !)
 » 5 years ago, # |   +11
 » 5 years ago, # |   +14 Here is my vision of the problem A.By any means we should get to the Shop 1. How many ways to do that? 1. Paths to Shop12. Paths to Shop2 3. Now, get back Home :)And the code looks like this: int min_path_to_shop1 = min(d1, d2 + d3); int min_path_to_shop2 = min(d3, d1 + d2); int min_path_to_home = min(d2, d3 + d1); int total_path_travelled = min_path_to_shop1 + min_path_to_shop2 + min_path_to_home; I've solved just A. But I hope that at least I could be helpful to those who struggled with it :)
•  » » 6 weeks ago, # ^ |   0 thanks,very much helpful....
 » 5 years ago, # |   0 It might have been more fun to make pretests for A weaker. I actually thought about only two situations at first, but I realized that there were another two, not using either the path to A or B. It was kinda tricky. But the problem B also had some hacks, so... NICE CONTEST!!!Also jellyfish for the next time...?
 » 5 years ago, # |   0 Any thoughts, when will we get a tutorial for this contest's problems?
•  » » 5 years ago, # ^ |   0 Its already there. Check editorial link
 » 5 years ago, # |   0 biết bao giờ mới lên top đây :'(
 » 5 years ago, # | ← Rev. 2 →   0 submission 14466949 for 599 B http://codeforces.com/contest/599/submission/14467218 Why I am getting wrong answer. Please explain