fcspartakm's blog

By fcspartakm, 11 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?
»
11 years ago, hide # |
 
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 :)

»
11 years ago, hide # |
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.

»
11 years ago, hide # |
 
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

»
11 years ago, hide # |
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 :))

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

It was good

»
11 years ago, hide # |
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 :)

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

:D .

»
11 years ago, hide # |
 
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.

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

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

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

Scoring distribution?

»
11 years ago, hide # |
 
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.

»
11 years ago, hide # |
 
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)

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

Thanks fcspartakm

Nice contest :)

»
11 years ago, hide # |
 
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????!!!??? :(

»
11 years ago, hide # |
 
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

  • »
    »
    11 years ago, hide # ^ |
     
    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.

»
11 years ago, hide # |
 
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?

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

Great contest! Thank you fcspartakm!

»
11 years ago, hide # |
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.

»
11 years ago, hide # |
 
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 ?

  • »
    »
    11 years ago, hide # ^ |
     
    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).

  • »
    »
    11 years ago, hide # ^ |
    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

  • »
    »
    11 years ago, hide # ^ |
    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 ...

»
11 years ago, hide # |
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

  • »
    »
    11 years ago, hide # ^ |
     
    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 :)

»
11 years ago, hide # |
 
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?

  • »
    »
    11 years ago, hide # ^ |
    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.

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

Problem C was so ill framed in English :/

»
11 years ago, hide # |
 
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? -___-

»
11 years ago, hide # |
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 ?

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

    "Wrong answer on hack 1"

    Doesn't it mean weak cases?

    • »
      »
      »
      11 years ago, hide # ^ |
       
      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

      • »
        »
        »
        »
        11 years ago, hide # ^ |
         
        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?

        • »
          »
          »
          »
          »
          11 years ago, hide # ^ |
           
          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

  • »
    »
    11 years ago, hide # ^ |
     
    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...

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

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

»
11 years ago, hide # |
 
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?

»
11 years ago, hide # |
 
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)

  • »
    »
    11 years ago, hide # ^ |
     
    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.

»
11 years ago, hide # |
 
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 :(

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

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

»
11 years ago, hide # |
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!!

»
11 years ago, hide # |
 
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?

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

Guys, did I solve one or two problems?

One

I meant two

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

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

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

is the contest unrated??

»
11 years ago, hide # |
 
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?

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

I'm waiting for ratings...

Do they come tonight????

»
11 years ago, hide # |
 
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???

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

I cannot see the problems in the "PROBLEMSET".

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

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

Doesn't it look very similar!

»
11 years ago, hide # |
 
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

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

Can you help me?

http://mirror.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...

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

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

»
11 years ago, hide # |
 
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.

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

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

    • »
      »
      »
      11 years ago, hide # ^ |
       
      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.

      • »
        »
        »
        »
        11 years ago, hide # ^ |
         
        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