fcspartakm's blog

By fcspartakm, 9 years ago, translation, In English

Hello, Codeforces!

I'd like to invite you to Codeforces Round #297 (Div. 2). It'll be held on Thursday, March 26 at 19:30 MSK and as usual Div. 1 participants can join out of competition.

Great thanks to Maxim Akhmedov (Zlobober) for helping me preparing the contest, to Maria Belova (Delinur) for translating the statements into English, to Mike Mirzayanov (MikeMirzayanov) for the great Polygon platform and ideas of some problems and to my old friends Pavel Kholkin (HolkinPV), Ilya Los (IlyaLos), Vitaliy Kudasov (kuviman) and Arthur Svechnikov (ikar) for writing solutions.

The scoring distribution will be announced later. Good luck everyone!

UPD The scoring is smooth dynamic (with steps of 250 points). More information about this can be found here. Tasks will be arranged in order of ascending supposed difficulty.

UPD2 Competition completed! Thank you all!

UPD3 You can find editorial here.

UPD4 Congratulations to the winners!

  1. cikofte
  2. fcspartakm_2
  3. stealife
  4. GITLER228
  5. alpq654321
  • Vote: I like it
  • +175
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
  Vote: I like it -171 Vote: I do not like it

hello, i have decided that i'll downvote every comment in this post for fun :)

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

    Sure, then everyone who comments in this post will downvote you for fun :))

    • »
      »
      »
      9 years ago, # ^ |
      Rev. 2   Vote: I like it -14 Vote: I do not like it

      downvote Is interesting and helpful for get negative contribution :))

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

        Everybody wants positive contribution as like as positive rating..but?

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

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

    It' s funny. I wish you get more and more downvote

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

    Blog upvotes: 145. Your comment downvotes: 154. See the diference!

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

    Can moderators add an option to disable people from commenting who troll here? I am pretty sure people are here to learn and not to waste time on attention seekers.

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

      Do not be so serious. If there are no fun over here it will be boring.

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

        I enjoy funny comments as well but let's just agree that this guy's comment is pure crap.

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

Your last contest had nice problems.

Thank you for creating another contest.

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

I think you mean "translating into English"? :)

As I see that you are from Russia and the google translate of your blog in Russian gives "translating into English" too

»
9 years ago, # |
Rev. 2   Vote: I like it -74 Vote: I do not like it

The comment is hidden because of too negative feedback, click here to view it :))

»
9 years ago, # |
Rev. 2   Vote: I like it -11 Vote: I do not like it

It was good

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

Why does the registration close in less than 2 hours?

Edit: Fixed :)

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

:D .

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

Thanks for the contest . Hopefully it will be a great learning expirience for everybody.

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

to div1 users: please dont create new accounts :||

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

Scoring distribution?

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

Codeforces Round #297 (Div. 2) 297 which is divisible by 9; 2+9+7=18=1+8=9 which is also divisible by 9; 2+7=9 && 9 which is also div by 9; Have any problem of divisible by 9? Best of luck.

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

I have a doubt. If 2500 people out of 3000 solve A , 2400 solve B , then how many points will be allocated for A and B (lets assume no of Solutions for C,D,E is < B)

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

Thanks fcspartakm

Nice contest :)

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

The scores of problems was so low that hacking was important than solving problems...

Why????!!!??? :(

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

What is solution to problem C...it seems like simple task but I cannot pass Pretest 4

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

    Just make right rectangles. The square would be bigger, if the side of rectangle would be bigger. Let's sort them! And after that you can use dinamic programming.

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

      Does dp is really needed here? I've solved without it.

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

      No DP is needed. Sort and then traverse backwards.

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

I had a strange problem during the contest, two times my default compilator changed from GNU C++ to GNU C (and I get two compilation errors :)). Did someone else noticed such thing too?

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

    I had the same problem.

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

    Yes, compilator changed from PyPy 3 to Python 3, but that change got me AC to problem B :) (It was TLE in PyPy, but same code got AC in Python)

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

    Same here...

    So will we have -100 because of two compilation errors?

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

    Mine changed from GNU C to GNU C++ :)

»
9 years ago, # |
  Vote: I like it -15 Vote: I do not like it

Great contest! Thank you fcspartakm!

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

    multiple account?

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

      really??? then Sorry_dreamoon is probably duplicate too...

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

Could somebody give me a hint of how to approach D and E?

Edit: Nevermind, the editorial was posted surprisingly quick.

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

I see the most hacks are in problem B.

Can anyone tell us what's the hacking test case ?

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

    It was just a big test(maxtest). Some people used std::reverse and the complexity of their codes was O(N^2).

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

    Just TLE. We must not swap symbols in all substrings, because it gives O(n / 2 * m) orepations

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

    Many people did a slow O(NM) solution, reverse all the segments.

    Of course it's not passing for test case like:

    aaaaa... 100000 1 1 1 ...

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

Pff, I'm so sad because I didn't figure out E ... :(

Update: Nooo, my C is wrong :( :( :(

Those hacks saved my a*s :D

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

    Same here, my C got pretests wrong, because of integer overflow!

    So I make up for it with lots of hacks :)

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

Why this test generator is wrong ? the only explanation for that is 1 space in the end of file, because this works well.

Why 1 space generates an invalid input?

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

    Because it is an invalid input. Somebody may read using fread with a buffer(sometimes I do so) and when you see the size of the buffer, then you can generate a test with a lot of spaces in order to make his/her buffer overflow and hack him/her.

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

Problem C was so ill framed in English :/

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

791 ACs on C. Then why would this problem have 1000 points? Isn't that the general solve count for problem C in a typical CF round? -___-

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

WA during the contest : 10474140 AC after the contest with the same code : 10476119 Just put a #include in a comment Any explanation ?

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

    "Wrong answer on hack 1"

    Doesn't it mean weak cases?

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

      If I was in other room ,the code would have passed system test ! It isn't fair

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

        You mean that the solution didn't even pass the pretests or it passed them and then it was hacked?

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

          Passed the pretests then it was hacked after that I wrote a new code and got Wrong answer on hack 1, after the contest I re-submitted the same code ( which was getting WA on hack 1 ) and got AC

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

    i had the same problem before in another contest, the thing guys told me back then was that limits.h is somehow not supported but i dont know exactly whats wrong...

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

      Problem A got accepted and limits.h was included

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

        its strange... i think it would be more useful if you asked this in stackoverflow.com

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

Was the round Unrated? if not, when will the ratings be updated??

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

in problem C in the test case 4: 8 5 3 3 3 3 4 4 4 how correct ans is 25?

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

On C it wasn't particularly clear that multiple rectangles are being created... "Ilya decided to make a rectangle from the sticks" implies at least initially that there is only one rectangle. (Or maybe I just need to read more carefully)

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

    Agree. Google translate does a better job:

    "Ilya decided to make rectangles of the sticks."

    I hope that the translators be more careful about the singular/plurals.

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

D was one of the most interesting problems i have ever seen. Too bad i took wa on #12 :(

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

Thanks who send to B with O(n^2) complexity

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

can anyone help me why this solution got WRONG ANSWER http://paste.ubuntu.com/10685457/

UPD : it's okay i got it now!!

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

Can anyone tell me why my C solution was skipped whereas the same code got accepted after the contest?

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

Guys, did I solve one or two problems?

One

I meant two

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

I'm afraid to seem impatient but when ratings will update?

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

is the contest unrated??

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

Would you mind putting " UPDX Contestants' rate changed" in the end of the post, when new rates apply?

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

I'm waiting for ratings...

Do they come tonight????

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

I am staying up all night just for looking at the rating update. When will it be updated???

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

I cannot see the problems in the "PROBLEMSET".

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

    Oh, I find them. But it is very strange that they are not listed in top.

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

This is the code used in Winner's C: http://codeforces.com/contest/525/submission/10463905 This is the code used in enesoncu's solution to another problem: http://codeforces.com/contest/436/submission/10422970

Doesn't it look very similar!

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

Can you tell me what is wrong with hacking using generator? I tried three times during this contest, but i have got Validator 'val.exe' returns exit code 3 [FAIL Expected EOLN (stdin)]

Probably this is connected with the fact that i have used std::endl? How to do it correctly? Should I use "\n" next time? Because I really could have done at least 2 hacks!

Thank you

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

Can you help me?

http://codeforces.com/contest/525/hacks/143414/test

Judge return this:

Validator 'val.exe' returns exit code 3 [FAIL Token parameter [name=s] equals to "/********...correspond to pattern "[a-z]{2,200000}" (stdin)]

I couldn't find any problems...

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

    It seems you've submitted it as a test, not as a test generator

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

Thanks for interesting problems and weak pretests. There were nice opportunities to hack.

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

Could somebody please help me to interpret the following wrong answer on problem D:

Test: #12, time: 717 ms., memory: 4404 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWER expected: '***..*......*...****.*****.*.....**.*******.******.*..***.***.**', found: '***..*......*...****.*****.*.....**.*******.******.*..***.***.**'

Both strings are identical, but still in some way the validation system seems not to like my string. Thanks in advance.

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

    Maybe you print '\0' at the end of your answer? :P

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

      rather not, as the wrong answer is in test 12 in the 6th word. In such situation all preceding tests should also fail.

      Thanks anyway. I am really puzzled with this error.

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

        The line is actually 2000 characters long, but Codeforces displays this kind of error like

        [some prefix]+"..."+[some suffix]

        Thus, in your error, the "..." unfortunately looks like part of the line. The real error is somewhere in the middle :P