When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

PrinceOfPersia's blog

By PrinceOfPersia, 9 years ago, In English

Codeforces round #305 is gonna take place soon and I'm the writer.

After my previous contest that many people think it was a hard contest, I prepared an easy contest to cheer you up!

I want to thank Haghani for testing this round, Zlobober for help me prepare this round and his great advises, Delinur for translating problem statements into Russian, mruxim and Yasser Ahmadi Phoulady (Rasta) for their advises and ideas, HosseinYousefi for helping me choose legends and graphics and MikeMirzayanov for great Codeforces and Polygon platform and guys from Physics Olympiad that kept disturbing me while preparing this round.

This is my second official round and I hope you enjoy it.

The main character of this round is gonna be Mike (I didn't say MikeMirzayanov :D).

Also you'll meet Xaniar and Abol.

I wish you all Successful hacks and Accepted solutions and high ratings.

Scoring will be posted soon.

GL & HF!

UPD: Scoring is:

  • Div.2: 500-1000-1750-2000-2750
  • Div.1: 750-1000-1750-1750-2500

UPD2: Due to technical reasons we moved the round by 5 minutes.

UPD3: Contest has just ended. You can find the editorial here.

UPD4: System testing is done.

Congratulations to the winners, specially dreamoon_love_AA that got to his goal !

Div.1 winners:

  1. dreamoon_love_AA
  2. HYPERHYPERHYPERCUBELOVER
  3. jqdai0815
  4. YuukaKazami
  5. subscriber

Div.2 winners:

  1. fromWork
  2. IloveGoodness
  3. norge
  4. rumman_sust
  5. williamzpf

See you in the next rounds.

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

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

Was looking forward to this :D

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

    huury up programmers! register! just 4700 person??

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

    We Want ratings!!!!

    UPD: We Want DIV2 Ratings! also we have final exams tomorrow(today!)!

    UPD2: disappointed from RATINGS! it's 1:30 passed and nothing happened :|

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

      I'm also waiting for rating instead of sleep. UPD: rating changed.

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

      First time to rank good, ratings delayed... FML

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

    Finally dreamoon_love_AA got first place in Div1!

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

    No body read the end so I commented here :/

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

The first round was awesome ;)

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

I see new person in the first place on contribution list!

Your problems are great! I couldn't participate (I was in school), but next contest I won't miss.

I have only one suggestion : please make final test cases stronger...

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

I like your problems pretty much.Hope to see more interesting problems :)

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

    In my idea A and B should be solved by at least 1000 people(easy), But C,D and E should be harder. Not like the recent div2 contests that more than 1000 people solved A,B,C,D! :D

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

It is interesting that the author thinks about the complexity of the tasks

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

Does this round involve CoffeeMix? :D

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

Why isn't the post on main page?

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

he fell from the first place on the "Contibution list". "Let's prepare a new round to go first again", he says! :D

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

It's great to see that there is always a unique sentence in your blog!

The last one was thanking yourself! This time is about the guys from Physics Olympiad!

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

Your last round was Amazing :D wish this one be better ;)

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

Div.1 ,long time no see!

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

good job (Y)

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

I think it will be a very interesting contest. Because the author of this contest PrinceOfPersia. I think there are a lot of hacks. ('_')
Sorry for my poor english.

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

Your problems are great, they only need a little more concentration :D

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

Wow, this round has Div.1, great!The time gap between Div.1 contests is so long, hope Div.1 contests will be more frequently.

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

    Ehm, there were many div1 (some div1 only, even) rounds before. Don't expect an even distribution of contests.

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

      Just hope Div.1 contests will be more mush.

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

sorry for the comment... my friend troll me.

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

I can't stop looking at those adorable characters.

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

Your last Round had one problem with weak test cases as i mentioned here

I wish this one be better

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

"Yasser Ahmadi Phoulady" what a legend ! :D

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

    He is our (Me and PrinceOfPersia) teacher. Show a little respect.

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

      is legend in your dictionary an abuse ??

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

        your comment sounded like an abuse

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

          It's Persian's Magic :D

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

            It's farsi not persian learn your countries language

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

              You Can Check Persian In Translate.google.com And FUS :)

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

                they should call farsi, farsi not persian !!!

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

                  I don't understand why you keep insisting that it should be farsi not persian. Actually the name "Farsi" started to being common because the Arabs couldn't spell "P". So the word "Persian" is more likely to be the original one. : )

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

                  sorry the time i sent that comment i was a child !! now i've grown up!! :D

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

    Yasser Ahmadi Phoulady Rasta Actually. Rasta is part of his name not Nike name or something else.

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

      His first name (in passport) is Yasser, but everyone calls him Rasta (Rasta is not part of his name).

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

        it would be more legendary if it was! :-"

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

          i dunno if what you said is good or bad but i assumed that it was bad and downvoted you

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

            You Have Big Problems In Understanding "LEGEND"

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

              yes i have big problems thus i downvoted you

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

                I Dont Give A Fuck About It :)))

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

                  you did that's why you placed a comment here :))

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

                  i upvoted this because i think you didn't mean anything bad but i dunno about neverless

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

                  You upvote or downvote is just related to your self. Don't spam please. :-"

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

                  i downvoted this xDDDD

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

                  :|

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

I really waited this round.

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

Cheer up, but not too easy :D

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

A contest from a 3rd highest contributed user of Codeforces and also a red coder in a year !!! Eagerly waiting to compete the round and hope I will stay in division — 1 after this round .

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

this account Athee registered 16 min ago, trying to down codeforces ?

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

I prepared an easy contest to cheer you up!

Then why Div 2 C and E have more points than usual? I don't have a problem with harder problems, but your actions should follow your words.

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

    Scoring is related to other contest problems, not other contests problems.

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

      does it mean that this div2C/div1A is harder than 299's div2C/div1A ??

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

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

contest synchronization with Persepolis football match ):

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

+1

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

Good luck all!

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

Why delayed?

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

Delaying the rounds is really really annoying!

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

There are 3 times more Div 2 registered contestants than there are Div 1

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

1600 and 4800. Wow 6400 in total

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

1600 Registrants in Div1 and 4800 in Div2. Is there any limit or is it just a lucky round?

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

Now I know what easy means :-"

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

Div1 — D

Though I still found it very amazing that Swistakk was able to submit D 2 mins after he submitted C. Did you use same approach as my URL or some even more magical approach? :D

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

    I added extra points so all the rows and columns have an even number, then did an Euler tour. It's more-or-less equivalent to your approach.

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

    NOOOOOOOOO!!!! I didn't change MAXN when copying ;___;. I would have been 5th and my life would be complete, because finally I would be in Petr's blog ;_;.

    Of course time of 2 mins can be only reached by copying and I copied code from here: http://ki.staszic.waw.pl/task.php?name=ogrod This task is present on that site, because it was inspired by exactly that IMO problem. By the way, it can be clearly seen that my coding style significantly changed since time when I coded it (in February 2011 :P).

    UPD: It's very funny, I changed this and I got WA on 38th test. I assumed (4 years ago :P) that resulting graph will be connected. It seems that copying such old codes is risky decision :P.

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

      You already were on Petr's blog, right?

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

        But not on pictures with standings :P.

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

      In the middle of the contest, I saw that your solution will fail because of MAXN and I made a decision to put maxtest in the pretest in all problems in the future. I feel really stupid, this task is a kind of task that it's ridicules if maxtest is not in the pretests. Sorry !

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

        Ah, yes, you're lucky that you said that before I have thought about complaining about that :D. But my solution will fail either way :P.

        Thing which makes me wonder is why Zlobober didn't take care of presence of maxtests in tests? He should be well aware of need of them.

»
9 years ago, # |
  Vote: I like it -44 Vote: I do not like it
The comment removed because of Codeforces rules violation
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to do DIV2C/DIV1A?

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

Much hard, so math... couldn't solve anything :( Who found it easy?

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

Last minute connection problems ==> So frustrating!

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

How can solutions of complexity O(q*n*m) work for the given constraints in div. 2 B . I tried to hack 4 solutions of this complexity and all were unsuccessful :/

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

    same here

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

    Same doubt. I tried once and it was unsuccessful, so I did not try again. But I am baffled.

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

      I thought that maybe the programming language used was the issue.. so i tried to hack solutions of slower languages ..

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

    And all of them failed the system tests ..

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

Why is there a restriction on size of input file to hack solution's. I could not hack a solution for TLE, it say's max size of input file should be 256 kb.

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

    same issue . ultimately the user got tled :/

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

      Use Test Case generator in such cases. Write your code whose output will be the input which you want to give.

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

        This would have done it?

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

          yes. Or better still use this:

          for(int i=0;i<500;i++){

          for(int j=0;j<499;j++)

          {

          printf("0 ");

          }

          printf("0\n");

          }

          `` So that you don't give any extra whitepsace in the input.

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

E is really well known problem.

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

Couldn't submit solution because of lags in the end.

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

Successful hacking attempt at 2015-05-26 21:34:55 (hack ID 155718)! 5 seconds before contest ends!

Thanks Mike for delaying the contest... got 100 more than I deserved!!

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

The system crashed in the last minute here, Does anybody got the same problem?

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

Problem B Div 2 : O(N * M * Q) solution can pass ?

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

First time that I submit a problem for 26 times! ᕕ( ᐛ )ᕗ

[Definitely will fail in system tests ⊙﹏⊙]

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

It was userful today :-)

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

    What was solution for C? I knew this and still couldn't solve it.

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

      Just taking sum of mu[i] * num[i] when a number is added/removed. I spent the majority of time searching for mobius function in your answers on Quora because I had forgotten the name of the function :P

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

    No, it wasn't. In this comment we are dealing with average value of that number, not worst case one.

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

I bet at least 100 A's will fail (including mine).

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

    Lol, out of 530 only 156 survived the systests :)

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

I had a really hard time getting the coordinates for problem B of division 2 right. Probably becuase I initially solved looking for the maximum consecutive bears in both rows and columns. After this my brain melted because I started confusing x and y coordinates.

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

Your contests are always full of hacks! I think dynamic scoring would be better for them!

Thanks! :)

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

Today's Special .. Div1 Registered 1600 Div2 Registered 4800 Div2/Div1=3 and Div2%div1=0

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

I fed up with my Div1-C. Guys can some one point out mistake I made in my submission?

UPD. Stupid mistake. Just need to change from

int id = query[it];
--id;
int x = a[id];

to

int id = query[it];
--id;
int x = id;

and everything is fine. :(

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

5 sec , just 5 more second , I could have submitted D :( :( . I clicked the submit button and the contest was over. Hoping like hell that my soln be wrong else :'( :'(

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

Less AC's for A than for C. Dynamic scoring would have been good today.

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

difficulty: B<C<A<D<E

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

    I don't agree.C was harder and if it had been full-feedback, you would see it.It had smaller number of AC codes just because of the particular cases.

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

nice problems,quick editorial,quick system testing,i can say that his rounds are the bests!!

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

Congratulations to dreamoon_love_AA for winning his first Codeforces round!

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

Div1 A was a very nice problem

About 950 submitted but only 156 got AC (in Div 1)

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

This was a nice contest. I was only able to solve DIV2 A and B though.

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

dreamoon_love_AA did it xD

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

What's the matter with div1 A ???

  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it
    1. Division by zero
    2. Some people wrote that division by zero means "-1" which is not always true

    16 1 8 2 0 0 8 0 8

    hack test. answer = 3

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

Two months have gone, and I still don't know how to find an Eulerian circuit. (I failed on problem C in round 296 and problem D in this round) :(

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

    It is too simple :)

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

    http://codeforces.com/contest/429/problem/E

    Try this problem :P. It's very similr to today's one, though I have never understood how it should be done ;_;.

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

      Yes, I can alway come up with solutions to this kind of problems, but can't accept them in the contest.

      In srm 617, I spent too much time on the hard problem, and had no time to code the medium problem. (PieOrDolphin, which is quite similar to this problem. I used an approach with higher time complexity, and can't copy its code.)

      In round 296, I copied the code from Internet, while the time complexity is O(nm), and I did't know. I failed the system test.

      In this round, I copied the code from accepted solution in round 296. But I made a mistake in dealing with odd cycles.

      I think I should practice more and add a correct and efficient code into my code template. :)

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

        "Odd cycles" in this problem :D?

        I understand that your problem is getting them properly coded and accepted, but either way, I think that best way to improve is to practice on similar problems :P.

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

I knew my C for div2 would fail after submitting. But I didn't have a better idea.

It is actually fun to see yourself in top 100 (80th precisely) even during contest. :P

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

What's up with DIV2 C ? Only 12 Correct submission.

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

I prepared an easy contest to cheer you up!

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

dreamoon_love_AA's Dream come true Today :P

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

I see to Div.2 results and think that dynamic scoring would be more interesting here. People who solved C would have more points.

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

jqdai0815 get the 3rd place. Is there any wrong with winner announcement?

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

Today I was wrong on reading and trying to solve problem C before problem B because I got the idea but failed to prove it.

Looks like solving A and B in minimal time would have got me in top 100 instead of ~900.

BTW really nice round, problem C and D was really good. But I think in problem B , Solution having execution time O(n*m*Q) should not passed because it would have been similar to A then.

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

    I tried to hack a submission like this, but unsuccessful :|

    What is the hack test?

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

I felt very stupid when more than a hundred people solved Div1 D and I couldn't, but then came system tests...

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

    I felt the same with Div 2 C. More than 600+ submissions, but then came the system tests...

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

I think A should be at least 1750 points beacuse there is fewer people to solve A than C. (Div 1)

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

    If the pretest of div1A can be stronger, I think more people can solve it...

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

      I thought pretest 6 is very strong... I thought I can get Accepted if I passed pretest 6 However when I hack others with test (test 74) I found I get Wrong Answer too. How sad. And I Wrong Answer on Test 71 in final test. Not Failed in my Hack Test :(

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

Wasted lots of time on A, and don't have time to write solution for E. What a sad story!

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

    It is a good way for me to give up div1A and try to solve B,C first...

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

I hate my coding skills. :( . Please downvote me and then find me and kill me. I don't want to go through this again :'( .

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

problem D: http://www.spoj.com/problems/HCHAINS/.

although I somehow got TLE today..

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

    Your Euler circuit is O(nm), for example triangles with common vertex 1. On such test you run O(m) cycle O(n) times. It is really common bug.

    To get O(n + m) you need to keep pointer to first edge that was not checked yet in current vertex.

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

      Cool, tnx. I just copy pasted model solution from spoj problem. That also means we had bad test data there.

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

I think your first round was easier :)

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

I see rumman_sust in 4th place at div2. But he is not listed as winner.

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

thank you for so easy div 1 contest (mostly for problem A)

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

Now dreamoon_love_AA says: Sorry qwerty787788 :D

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

Now this is shocking. I tried to hack Div2 B but could not even though solutions had O(N*M*Q) complexity. But then they failed system tests. Someone please explain this

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

please don't prepare any more ("easy") contests

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

It is unusually contest!

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

11305842 Accepted. This is Impossible!

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

Well, this round wasn't that hard. Yeah, Div1-A was a problem that I will hate a long time after this round because I somehow got WA after a couple of non-passing-pretests submission because of 2-3 forgotten lines (that I knew they should be there).

However, problem B in Div1 was easy, I regret reading it only after 45 minutes just because I wasn't sure that I will solve it and I would have lost my time and actually I lost my time but on problem A :(

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

DIV2 B, how this solution passed the system test with (Q*N*M)?? Please someone explain 11295339

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

I made a test case for DIV2B of n=500 m=500 q=5000 to hack this guy (You can see his DIV2B got tle'd) but i got maximum input limit exceeded . How could this be avoided

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

    When hacking, you can submit input generator code instead of input file to avoid such problems

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

    I think you can upload the case generator instead of copy and paste.

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

Cool Problem Div1.A/Div2.C! A lot of failed attempts :-) Get TL :-(

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

I am getting TLE on div1E.Is there any better complexity? Mine si (Q + N) log(number_of_letters)

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

How long does it take usually for ratings to be updated?

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

it looks PrinceOfPersia changes ratings by his own.His contests' rating changes take toOoOo long

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

Why??? Why my raiting become 1700??? So close to Div.2 (

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

Never thought that DIV2 B can pass O(q*m) solution.How many instructions codeforce judging system allow to execute in 1 sec?

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

    q*m is not much at all — just 2.5 * 10^6 iterations. Even my python solution passed it (mine is actually O(q*(m + n)), which is twice more). Keep in mind that python is like 30 times slower that c++/C#/java.

    q*m*n would be more questionable — its 1.25 * 10^9 iterations.

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

    First I tried a O(N*M + QlogN) using two different Segment Trees, but it got wa4, I changed it for O (N*M + Q* (M + logN)) which ACCEPTED. After the contest I fixed the bug on my first attempt and sent it, got AC, but with a slower time than the one AC in contest. Limits should be greater, so no slow solution could pass

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

how to solve Div 2 Problem D? Is it possible to solve it in O(n) or O(nlogn) is the optimal solution?

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

    Optimal solution is O(n).

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

      can you please tell me how to approach the solution in both these complexities

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

      Don't you have a union find that makes it technically O(nloglogn) or O(n\alpha(n)) ?

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

My solution for Div2 problem D failed at testcase 51 , can someone tell me what is this testcase?

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

      because of large input line, i am unable to see complete testcase. Can you help?

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

    the test cases are trimmed.

    the input format is: n=100000; each array element is either 1 or 2

    expected output is: array of 100000 elements in which all elements are 1, except first element which is 2.

    your output: array of 100000 elements in which 1st 16 elements are 2, rest of the elements are 1

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

      Thanks a lot guys !!! got my stupid mistake.

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

Div1 D was very nice! I like this problem very much:) Thank you!

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

All's fine, but where are the ratings for Div2?

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

Can anyone tell me How this soln got accepted:--

http://codeforces.com/contest/548/submission/11297296

Its O (n*m*q) i.e. 10^9 .....How this runs in 2 sec...

I tried to hack this sol using full constraints but this gives me unsuccessful hacking attempt....

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

    Same experience as yours. I have unsuccessful hack on 11285479, but someone else have successful hack on that using full constraints :(

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

I hope that division 2 ratings will be published in this century ;-)

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

No rating update for Div2?

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

Congratulations to the real winners!

Real Div.2 winners:

  1. norge

  2. rumman_sust

  3. I_Love_Hanh_Trinh

  4. SmallBoy

  5. raihatneloy

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

    What was the problem in the official one??

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

      fake accounts

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

        I think it's very unlikely that someone capable of winning Div2 would compete there with a fake account while there is also a Div1 contest.

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

I guess Div 2. was unrated :|-_-|:

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

  2. Now I can go to bed)

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

Please for the love of the gods !!! Rate us now !!!

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

i hope we see you really soon

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

Div 2 forever. :')

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

Sorry, the rating update delay was the result of our with MikeMirzayanov investigation. It is now updated.

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

    what investigation?

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

      Stay tuned and you'll see :-)

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

        I hacked div2 B, making use of the fact that O(n*m*q) will fail, any reason for unsuccessful hacking attempt?

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

          Complexity was O(q*(n+m)) in most solutions.

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

        Was it shown already? Or when will it be shown?

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

IN problem B my submission shows wrong answer in test 4 which is Test: #4, time: 15 ms., memory: 0 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWER Input 5 5 30 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 0 0 3 2 2 2 2 2 4 3 1 4 3 2 4 1 2 4 1 4 2 1 5 2 4 1 4 1 5 1 2 4 2 4 4 4 1 2 3 1 4 5 1 2 2 3 1 1 5 1 3 4 1 1 5 4 1 5 5 4 2 2 Output 4 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 4 4 4 4 4 4 Answer 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 4 3 3 4 4 4 Checker Log wrong answer 1st numbers differ — expected: '3', found: '4'

Here you can see that after the 1st query the maximum no. of 1 is 4 in 2nd row ,hence the answer should be 4 not 3....please clarify

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

    original matrix in this test case is

    01110 11011 01111 00110 00000

    after first query (3,2), it will become

    01110 11011 00111 00110 00000

    hence, 3rd row has highest number of consecutive 1's, that is 3. so answer for first query is 3 and not 4.

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

if that contest is easy, how will be the hardest one?

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

    Actually, today I was thinking about preparing a really hard contest >:)

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

      I think people forget that you are preparing these contests voluntarily and start demanding and complain rudely instead of asking nicely and being grateful that you are taking your own time to prepare them.

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

        I really enjoyed the editorial, I learned a lot from it.

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

When can you post editorials? Thanks in advance.

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

Is it normal to receive more than 200 points of rating if you've solved 0 problems? Results of sheisactually14 seems strange... Can someone explain how this can be?

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

    Something seems off, when I put my mouse on top of the vertex representing the user's participation in the contest it say rank:177. However when we click the vertex it says rank is 631.

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

Btw, lots of people are making fun of statement that this contest was supposed to be easy. Looking at number of accepted A's — that is in fact funny. But looking at the scoreboard from around ~1:30 we can say that it in fact was true. There were people (note plural) which got all 5 tasks accepted on pretests before 1:15. I got 4 of them in 0:41, cubelover was even faster (0:39) even though he didn't copy D as me. That is a very rare case. C, D and E were all easy or well known to more experienced coders (though I'm a sucker when it comes to strings, so E was neither easy nor well known to me). Of course getting tasks on pretests is not equivalent to getting them, but very often means getting right solution with minor bugs, if any — so it is also a good base to judge whether tasks are easy/hard.

PrinceOfPersia, I think that your problems are nice, but this problemset was not properly balanced. Problem A was for the second time very hard for A (even swapping A and B wouldn't change that), but D and E should be more demanding. And talking about hardest problems I will advise to make them more complicated from coming up with solution point of view, because both of your E's were pretty standard for people well acknowledged with needed data structures, main difficulty was put on implementing them, I think. (Note that it is my opinion, I do not claim it to be only objective one :P).