Yury_Bandarchuk's blog

By Yury_Bandarchuk, 4 years ago, translation, In English,

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

 jerjerismygf

 rakhashov.maksat

 jeremy624lolz

Div. 1 Winners

 MrDindows

 anta

 langtrunghieu

Congratulations!

 
 
 
 
  • Vote: I like it
  • +415
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +167 Vote: I do not like it

First problem be like:
Spongebob and Patrick like to light fire under the ocean when it's cold! ...

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    And The Second Problem Like This...

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Spongebob was developed for mentally retarded children..

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    There are many hacks in this contest.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      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...

»
4 years ago, # |
Rev. 3   Vote: I like it +38 Vote: I do not like it

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 :/

»
4 years ago, # |
  Vote: I like it -10 Vote: I do not like it

aye aye captain!

»
4 years ago, # |
Rev. 2   Vote: I like it +33 Vote: I do not like it

Good way to celebrate children's day :D

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What a nice idea. Good luck to everyone

»
4 years ago, # |
  Vote: I like it +7 Vote: I do not like it

Good Luck All ^_^

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I love Patrick . He is really fun so I think this contest will be really funny and I wish good luck to everyone.

»
4 years ago, # |
  Vote: I like it -13 Vote: I do not like it

is it only me who hasn't seen SpongeBob? :P

»
4 years ago, # |
  Vote: I like it -16 Vote: I do not like it

Not sure if it's codeforces or cartoon network

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -12 Vote: I do not like it

    Did you mean Nickelodeon? :P

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    It is Codeforces just probblemsetters adding this pictures(or cartoons pictures) just for fun.It is more enjoyable for coders!

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Especialy when you have to wait longer to download 1st problem

»
4 years ago, # |
  Vote: I like it +15 Vote: I do not like it

i hope short problems statements :)

»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Time shedule change. Today's contest time 19.35 . I hope next contest time 19.35(1/2).

»
4 years ago, # |
Rev. 2   Vote: I like it +19 Vote: I do not like it

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I love Spongebob and I hope " I love this contest " too :D.

»
4 years ago, # |
  Vote: I like it +37 Vote: I do not like it

Two Future Contest already Announced , So Nice :)

»
4 years ago, # |
  Vote: I like it -20 Vote: I do not like it

How can I give problems on codeforces?And how can I know my problems to be selected?

»
4 years ago, # |
  Vote: I like it -7 Vote: I do not like it

Thanks to autors for Round!!! Good luck all contestants

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Yeah! love spongeBob, looking forward it!

»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

Spongebob is love, Spongebob is life. This contest's gotta be good.
Someone dare to say "I hope Spongebob dislikes math?"
(Downvotes swarm incoming...)

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it

    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.

»
4 years ago, # |
  Vote: I like it -31 Vote: I do not like it

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +24 Vote: I do not like it

    Oh God... Codeforces should restrict such big images.

»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Yah :) A coding month :) Just love it :)

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Have a nice evening and good luck everyone~~~

»
4 years ago, # |
  Vote: I like it -6 Vote: I do not like it

if you see this coment and you will have a increase of rating!you Konw I am lucky star!

»
4 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Wish Mr.Plancton doesn't have a evil plan for your rating! good luck all CF members! :))

»
4 years ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

is it spongebob photo album or round announcement ?

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Why late 5.00000 minutes.

»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

what about scoring distribution?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    As usual, scoring distribution will be announced after the contest.hahaha.......

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Forgot to register, NOOOOOOOOOOOOOOOOO!

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What is scoring distribution?

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Spongebob and his stupid friend Patrik are here to challenge us quite interesting!!! :-)

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

When do you want to announce the scoring distribution?contest is starting :|

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    It was published in Russian version of the post, but the author forget to add it to English one.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it -18 Vote: I do not like it

      When are you going to remove Russian Codeforces?

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Why would we do this?

        • »
          »
          »
          »
          »
          4 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          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.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What was hacking test of prob B?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    wish I knew it :(

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 3   Vote: I like it 0 Vote: I do not like it

      It's difference between Ambiguity and Impossible. Example

      3 3

      1 2 1

      3 3 2

      Will give Impossible but your code maybe giving Ambiguity.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    2 2

    1 2

    1 1

    ->

    Possible

    1 1


    2 2

    1 1

    1 2

    ->

    Impossible

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think if the case is "Ambiguity" and "Impossible" at the same time, it should be "Impossible".

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +4 Vote: I do not like it

      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.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    In that case when answer is possible but you have printed Ambiguity even it is not appeared in B.

    3 3

    3 2 3

    2 2 2

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

  • »
    »
    4 years ago, # ^ |
    Rev. 7   Vote: I like it 0 Vote: I do not like it

    Edit: C has more successful submissions then B :| :|

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I was hacked for my B with a test case similar to this

    3 2 1 1 2 2

    Answer is clearly 3 3

    But due to a previous wrong implementation I was looking for duplicates in f-array. That gave me a hacked solution.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    3 3 3 3 1 3 3 2

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Anyone else got WA #16 for E? I am really curious about that test case.

»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Is D all about a cubic equation?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yup. Wish I clicked on it sooner. I clicked on it literally 2 minutes before end. Couldn't solve C, or B.

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Solved the problem D 2 sec late hope my solution idea will be wrong. Edit: Solution is wrong:)

»
4 years ago, # |
  Vote: I like it +52 Vote: I do not like it

This always freaks me out before realizing that System Test hasn't got to my correct submissions yet.

»
4 years ago, # |
  Vote: I like it +14 Vote: I do not like it

after this contest i will never see Spongebob :((

»
4 years ago, # |
  Vote: I like it +33 Vote: I do not like it

Nice problems, superfast editorial and superfast system testing! This contest can't get any better! :)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +30 Vote: I do not like it

    Thank you so much!

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      The first problem is what is needed. You first submit obvious solution and then realise, that there are tricky situtaions.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +37 Vote: I do not like it

    Thanks to GlebsHP too. :)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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!

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Problem B isn't written well, I don't understand it until now

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No it's written perfectly well, and it's crystal clear.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        It's because the pretests were a little weak.

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        • »
          »
          »
          »
          »
          4 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          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.

          • »
            »
            »
            »
            »
            »
            4 years ago, # ^ |
            Rev. 2   Vote: I like it +3 Vote: I do not like it

            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.

          • »
            »
            »
            »
            »
            »
            4 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Sorry, I didn't know that. After all, I am a mere Pupil. :)

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    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.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    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.

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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.

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Interesting round! "weak" pretests, many hacks at the end :)

»
4 years ago, # |
  Vote: I like it -25 Vote: I do not like it

Bad contest :|

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

But...But anta last visit at 25 hours ago

»
4 years ago, # |
  Vote: I like it +12 Vote: I do not like it

why is still system testing for me and can't submit anything, but number of accepts is getting more and more?

»
4 years ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

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);

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    you must do it to 1442251, because it can be ans for x around 1e18

»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

A gray participant who solved all 5 problems. Just wow.

»
4 years ago, # |
  Vote: I like it -24 Vote: I do not like it

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!

»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

D was much easier than B & C.

»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

I'm sad to get WA on test 65. I'm extremely sad that there isn't test 66 after I accepted it! :(

»
4 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Congratulation rakhashov.maksat for solving all five problems. From today you are my new inspiration :)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +18 Vote: I do not like it

    From today (s)he is my favorite troll :)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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 ?

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

easiest contest i ever solved

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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++)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    (x/(i*(i+1)))>=(2*i+1) ---> x>=(2*i+1)*(i*(i+1)) Now it's not confusing ;)

»
4 years ago, # |
  Vote: I like it +18 Vote: I do not like it

Yesterday I was 16 and today I am 17.
Yesterday I was expert and today I am candidatemaster.
Come on!

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

On the proble C: Tests was less than need. That is cod TL 14376989

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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; }

»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

why it's "Practice is allowed only for finished and unfrozen contests"?

  • »
    »
    4 years ago, # ^ |
    Rev. 4   Vote: I like it 0 Vote: I do not like it

    I have this problem too . what should we do !? UP : It's fixed now (at least for me !)

»
4 years ago, # |
  Vote: I like it +11 Vote: I do not like it
»
4 years ago, # |
  Vote: I like it +14 Vote: I do not like it

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 Shop1

2. 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 :)

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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...?

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Any thoughts, when will we get a tutorial for this contest's problems?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Its already there. Check editorial link

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

biết bao giờ mới lên top đây :'(

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

submission 14466949 for 599 B http://codeforces.com/contest/599/submission/14467218 Why I am getting wrong answer. Please explain