dreamoon_love_AA's blog

By dreamoon_love_AA, history, 9 years ago, In English

Hello, everyone! Codeforces Round #320 will be held at Sep/16/2015 18:00 MSK. Note that round starts in the unusual time!

The problems are from tmt514, Shik, drazil, and me(dreamoon_love_AA). Also we want to thank Zlobober for helping us preparing the round, AlexFetisov and winger for testing this round , Delinur for translating the statement into Russian, and MikeMirzayanov for Codeforces and Polygon.

This is my second time organizing a problemset for a Codeforces round (my previous round: #292). In my previous round all problems were provided by me. But I think that if problems are provided by more people, then the contest will be more interesting! So I asked my friends to help me this time. Hope everybody can have fun during the round!

Participants in each division will be given six tasks and two and a half hours for solving them (the last four problems in Div. 2 are as same as as the first four problems in Div. 1). Scoring system will be announced later closer to the start of the round.

Bayan is an Iranian software company working on large-scale web applications. It doesn't only develop the search engine, but also it holds an annual open competition Bayan Programming Contest with an on-site round in Tehran. The on-site round of 2015 became an international event with many strong participants.

Bayan has supported Codeforces on our Codeforces 5-year crowdfunding program. Thank you Bayan! This round is in your honor!

UPD 1: Due to technical reasons the round starts at 18:15 Moscow time.

UPD 2: The round will use the dynamic scoring with 250 points step.

UPD 3: Problems are ordered according to their supposed difficulty.

UPD 4: Winners!

Div1:

1) Um_nik

2) Egor

3) Endagorion

Div2:

1) EmaxxMaster

2) gongy

3) Irisviel_von_Einzber

UPD5: link of Editorial

Tags 320
  • Vote: I like it
  • +359
  • Vote: I do not like it

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

What about sorry_dreamoon ? :)

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

So does contest has 8 problems at all? 6 for Div2 and 6 for Div1?

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

EDIT: it's a bit strange for me. Isn't dreamoon_love_AA working for Bayan, is he?

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

I hope I can become violet back after this round.

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

I think it's a good place to ask, any news about Bayan T-shirts? As far as I remember they announced that T-shirts will be delivered after the final and that time is long gone.

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

    As I know from Bayan persian blog (written 3 months ago) the t-shirts quality provided by manufacturer was not what Bayan expected (I mean it wasn't good as expected), So by their agreements (with manufacturer) they forced manufacturer to reproduce t-shirts and Bayan did apologize in the post and said that it takes time to produce t-shirts again. BTW 3 months has gone and nothing happened! :-)

    here is the link of the post (you can use google translate if you want, that's not good enough, but at least helps!)

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

Bayan Story

It’s common that organisers fill empty spots if someone can’t come to onsite, so right after the Elimination Round I approached the organisers and asked them if they were going to consider inviting contestants that were down the list in this case. The response was….well, there was no response.

It came later as a surprise that 2 contestants who were ranked lower participated in the Finals. You would expect that in this event the organisers would treat this matter seriously and point out the reason for this. I raised this matter hoping to get a reasonable explanation…

By now no explanation has been provided by Bayan. I tried emailing them, sending personal message in Codeforces (more than once), asked question in Bayan blog posts on Codeforces, approached Egor directly (as he was writing a blog for Bayan), but he was unable to help either.

Unfortunately that still remains a mystery to me...

References: Previous Discussion, Elimination Round Results

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

Why every author announces score distribution just before contest? I really can't understand..

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

    Zlobober don't think that it is important for participants to know score distribution early. The main goals for authors and coordinator in the day of the contest are to fix translated statements and double-check everything. When all of this done we can discuss score distriburion.

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

      Moreover, I don't think that scoring should be published at all. Let me provide a link to my old comment to clarify my position.

      In a few words: the scoring is a part of a problem as well as, for example, the number of sample tests or the number of letters in the statement: it is some information that can be used to predict some characteristics (difficulty or "prettiness") of round with pretty low reliability. Then why should we post it? I don't see a situation when by knowing scoring something can change (for example, if you decide if you want to participate or not by looking on scoring, then, erm, it's your business, but it sounds very strange to me).

      In my opinion there is no need to post a scoring at all, but nonetheless there was such tradition before I became a coordinator, so we kept it.

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

This sentence causes some kind of confusion, it sounds as if you are talking on present round : "In the last round all problems are provided by me". Maybe this can be more clear: in my previous round all problems were provided by me.

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

    Thank you for teaching me English. > _ <

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

      Don't mention it. I just can't understand why community is giving negative feedback here :)

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

        Private message is better for typos and correcting grammar. Why would hundreds of people want to read such a message?

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

          Maybe you are right. Anyways, I had no offence in mind and it was just a suggestion :) Somehow I still believe that it's more valuable (to dreamoon for example) than 90 % of comments that I see here.

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

...

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

    challenge problem
    beautiful life

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

Damn... Round will start 17:00 CET. I break at 16:30, plus route to home. Why not 17:30? Damn...

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

How to unregister for the contest? I just registered for the contest and later realized I have other commitments, so cannot give the contest on time. Thanks!

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

    Ignore that

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

    Find yourself in registered list(it's easier to search among friends) and click red button

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

    Go to contest page, then to list of participants (there is number of registrants now x3066) and find your nick on that list. There should be X button, click it.

    It's good to unregister if you know you won't participate. Registration allows system to put users into rooms and we don't want some rooms to be almost empty, it would be unfair.

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

    Thanks fellas, I was able to unregister

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

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

Wish this contest will be suitable and thanks for preparing this CF round.

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

Is this a rated contest?

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

thanks for unusuall time :))

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

sorry :_(

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

what about scoring?

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

yess! Dreamoon contests ( math !)

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

    The problems are from tmt514, shik, drazil, and me(dreamoon). Don't be so happy!!!

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

Delayed for 15 min :(

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

Note that round starts in the unusual time! :)

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

Decided not to go to two of my lecture to do CF round. Delayed again

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

Oh my god :) big Delay

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

15 min delay again

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

We know that contest is postponed so there is no need to announce it in comments (just for gaining upvotes) !

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

    Hah!!! and you were expecting upvotes too!!! Ps. Please don't upvote as it will not increase ratings.

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

      I wasn't expecting upvotes. I just shared my opinion.

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

Is it just me, or the older codeforces gets the more technical difficulties we have?

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

The round will use dynamic scoring

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

Is problems sorted by difficulty ? (from your point of view)

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

6994 combined registrants...

Just a little bit short of 7000!

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

Came home early, was looking for an interesting contest, but got math and bitwise operations instead.

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

    Go away >_>... Problems were nice! I can't express how stupid I consider all those complaints about 'math problems'.

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

      It also baffles me. In fact, for me, as long as you have to devise an algorithm to solve a problem, it is a math problem. Then, I don't even know why people who don't math problems are here, in first place.

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

That dynamic scoring though -_-

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

.o. He is the new dreamoon in a dreamoon contest.

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

I figured the logic of C 3 minutes before the end :(

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

    And that is?

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

      You make the tallest possible pyramid that has (a,b) on either leading slope or lagging slope. This gives you the base of the pyramid and then you keep dividing the base by 2 until the value>=b. If b>a, -1. if b==a then leading slope, else lagging slope.

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

        I'm guessing base of pyramid is 2*x.

        Can you give a small proof why dividing works..etc

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

          Yes, so you just do this:

          while(c > = b)c/=2;

          This works because There exists a pyramid that will contain (a,b) if (a>=b) . This is an isosceles triangle. Two isosceles triangles can be made from this bigger triangle with bases base/2 each. Draw it on a paper and you will understand.

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

UPD: Sorry, I didn't make my point clear earlier, here is a bit updated version.

In absolutely any place in English statement of E there is written demand that history of footsteps has to be one that admits minimal number of backwards steps (nor it is even suggested). I think that only sane action now would be to change checker of E not checking if history printed by contestant minimizes number of backward steps.

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

    "Alice wants to know the minimum possible number of backward steps made by a person."

    "The first line should contain a number denoting the minimum number of backward steps."

    Isn't it written explicitly?

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

      Of course, it is written explicitly that first number of output should be minimal number of backwards steps, but that is not my point. My point is that in absolutely no place it is written that path outputted in second line has to admit that minimal number of backward steps.

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

        It'd be strange to ask as a certificate for the answer an unoptimal sequence of steps, isn't it?

        If you really considered this you should've noticed that outputting the first number and the second sequence are completely independent tasks (much easier than finding a certificate for an optimal answer). You probably wouldn't pass the sample tests or pretests. Also you could've sent us a clarification request.

        Although it wasn't written formally that we don't need any sequence just admitting left-right alternation rule but an optimal one, but my opinion that this case is unambiguous under some common sence.

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

          Of course common sense prompted to print path minimizing this, but what should count is not what I consider as sane, but what is written in statement. And I haven't passed even first pretest, but that is irrelevant to whether my point is valid.

          I'm an asshole right now, but I'm the one who is right, you can treat my hypothetical AC as my reward for very careful reading statement and punishment for yourself for not paying appropriate attention to make statements correct :P.

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

            From some point of view you are right. On the other hand, the rules should be introduced exactly till the moment they can't be fulfilled.

            Unfortunately, it is impossible to write a 100%-correct statement and to use some real-life legend at the same time. There will always be some amount of people who understand it in wrong manner. The outcome of problem preparation and testing process is that several people (several contest authors, 2 testers and me) read that text and didn't find anything wrong. The informal argument is that verification by 4-5 people is close to the limit we can afford during the preparation process, so I can't guarantee that statements will usually be better.

            But as a small reward for you, you are always welcome to volunteer as a tester and we'll be glad to fix all issues you find :)

            Of course, we won't rejudge this task. Hence, I apologize for an inconvenience.

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

    What do you mean?

    " Alice wants to know the minimum possible number of backward steps made by a person. "

    " The first line should contain a number denoting the minimum number of backward steps. "

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

Which test cases were used for hacking problem B div1?

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

Math Contest

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

how to solve Div 2 problem D "OR" game?

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

    DP

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

    Note the optimal solution is to use all your operations on a single entry. So you can check a[i] * x^k | pref[i-1] | suff[i+1] for all i in O(n) time.

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

      how can you say that the optimal solution is use all operations on single entry?

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

        Hint: 2 ^ i > (2 ^ 0 + 2 ^ 1 + ... + 2 ^ (i — 1))

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

        Consider two numbers n1 and n2. Suppose n1 has strictly higher no of bits than n2. It's given x>=2. So multiplying n1 by x once increases the position of most significant bit in n1 by atleast 1. Instead if you multiply n2 by x, position of most significant bit in n2 may increase but when | (ored) with n1, position of most significant bit may not increase.

        Since it's always better to maximise the position of most significant bit, we have to multiply n1 by x. In the next iteration (we have to multiply by x, k times), clearly n1 * x has more bits that n2, so we pick n1 again. So it's always better to multiply the same number with x.

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

      Well my DP failed :(

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

      I did exactly the same :) EDIT : I got all the 3 submissions accepted , rank 338 . So, happy :)

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

What is the counter-test for greedy solution of div1 E ?

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

    Explain your greedy solution.

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

      count number of L and number of R , if L is bigger than R then walk must start by L , same thing when R is bigger than L , in case of R eqaul to L , I try 2 possibilities

      now if my last step is L , then I try to find nearest not taken R from right , otherwise increase number of backsteps by 1 then find first not taken R

      same then when my last step is R

      for the very first step I find the leftmost L or R

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

    RRLLR

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

Math Math Everywhere !!

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

Div 1 C, "Weakness and Poorness".

Main problem statement:

Determine a real number x such that the weakness of the sequence ... is as small as possible.

Output specification:

Output a real number denoting the minimum possible weakness of ...

Feedback:

It's a bad style when main problem statements has clear imperative "determine X", and only in the output format I read "by the way, the task is not to find X, but to find Y!"

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

    Agree, that's our fault. Though, it doesn't really affect any of the solutions I know.

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

      It does effect mine!

      In my floating point solution, the error of x can be controlled easily and implicitly by setting the limit in binary search to 1e-6. Whereas the error of weakness is much more subtle and hard to control.

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

        Same here, my C failed and I quickly realised I had set low limit to my binary search, because in my head I imagined we're looking for X.

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

        Isn't it true that error of weakness can be controlled by setting the limit of binary search to 1e-6 / max_n > 1e-12 (because the function is a piecewise-linear convex function with absolute slope no higher than max_n)?

        My question above is just a curiosity, I agree with that the statement that this place was written in a bad manner. I apologize for that.

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

          Yes, pretty much. My solution with epsilon at 1e-6 failed (13037903), while my solution with 1e-11 passed (~1e-6 / 200000) (13052071).

          I mean, I understand this is a little detail that I missed, but I'm a bit disappointed that I missed this problem only because of this precision problem, even though I got the general solution right.

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

            Actually till today morning we asked for precision 1e-9 in this problem. With such precision it is almost impossible to solve this task with ternary search (but possible by some kind of convex-hull-like or halfplane-intersection-like solution). So I'd disagree that handling a precision is a little detail of the problem, as you tell. Sometimes precision may even fail a certain kind of solution, despite the fact they implement "general solution right".

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

              Right, calling it a 'little detail' isn't entirely correct, but the fact that an error in x is blown up by up to a factor 1/n in the output is something that is not immediately obvious (or at least not to me).

              The problem could have just asked for x, in which case the precision of 1e-6 would be more than sufficient (and there would be no error amplification in the output), but instead it explicitely asked for the weakness. To me this doesn't really make the problem more interesting or challenging. It just kills a bunch of solutions (like mine) that didn't consider the division by n.

              But yea, I'm just a bit sour because my solution failed and I missed the points, I liked the problem in general. At least I'm still orange.

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

      That's because they can check with the sample testcase, I lost a minute thinking I did sth wrong in the code

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

heeeeey Alex_2oo8 !

come on! it was my first div1 contest and you hacked my solution ! :(

you have got a heart of stone.haven't you? :D :P

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

    So, he gave you chance to fix your solution instead of it surely fail system tests, no?

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

Can anyone give me a hint for Div1.D, I tried DP but could not eliminate repetitions of the same string.

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

How to solve C ?

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

    Let's introduce the function M(x) — the minimum sum in subsegments and m(x) — the maximum sum in subsegments. Then it is easy to note that these functions are monotonic in x. Further, it is obvious condition for a binary search — if abs(M(x)) >  = abs(m(x)) than decrease x, else increase.

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

.

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

Pretest passed on Div 2 ABCDE, but got accepted on only D :'-(

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

Very nice contest, thank you dreamoon_love_AA
The idea for problem D has something familiar with problem Horses from IOI 2015.

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

in Div2 E Weakness and Poorness. how X is Calculated ?

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

How to solve Div. 1D?

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

Doesnt Ternary search take about logbase1.5(N) steps ? in C i looped 80 times and it gave WA and when i changed to 100 , it gave AC

http://mirror.codeforces.com/contest/578/submission/13051709

http://mirror.codeforces.com/contest/578/submission/13043558

Any idea why?

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

Can i know what's wrong in this solution for problem D. "Or" Game

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

    3 1 2
    17 18 5

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

      My solution give 55 for your case, and it's correct. Can i know if there's any thing wrong in my idea?

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

        Sorry
        3 1 2
        5 18 17

        Maximum value for now doesn't garantee that OR will be maximum in the end.

        That is why you cannot use dp.

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

In problem D, using inbuilt pow() function on my system gave me the correct answer for test 9, but for some reason it failed on the system tests. Anyone has an idea why the pow() function gave different results? ps: replacing the pow function by writing it manually got it accepted. Thanks

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

The 'or' problem, Can't you just multiply biggest number k times ?

I didn't try it it seemed too easy...

Can someone tell me if this is correct?

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

contest kiri

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

why the wrong answer test run on my computer is correct but here make my answer decrease 1 ? http://mirror.codeforces.com/contest/578/submission/13046231 upd:sorry,I have made a mistake that pasted my problem C solution ,my trouble is on problem B

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

    where can I get help? will codeforce retest my solution?

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

    I'm confused and helpless...how can I contact administor?

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

      What's the problem? How were you able to run this your program on this test locally (our interface doesn't allow to download the full test, isn't it?).

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

        but I can see which test get wrong answer in the page...

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

        The test cases are visible after the contest, so we just tested the case and got the right answer locally. (Its a small test case)

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

    Is it pow() funtion on codeforce dosen't work?

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

    finally I still got WA...

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

Div. 1 B, wrote suff[i] = pre[i+1] | v[i].

Copy pasting mistake -_-. The worst part is it passed all pretests and it passed all test cases till 16.

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

http://ideone.com/2nKw1d

My solution gives correct answer on ideone for Div1 problem 2 test case 9. However the server shows WA for tc 9. Please see. I think many users are having same problem.

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

    Don't use pow. Write your own function

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

    Same Power function is messing with answer; idk how

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

      But isn't it a codeforces error since it worked fine on our systems?

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

Thank you Dreamoon xD
and bayan :D

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

Why are my solutions "skipped"? I have not got any rating changes in this contest.

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

Can you give us eta on editorals?

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

It was very good contest! but the math was more than programming( at least in C(div2) )!

thanx dreamoon_love_AA !

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

hey guys https://gist.github.com/pse1202/a01d5c1f094e1599836a

This is my solution of Div2E/Div1C , but it's giving me a TLE

I'm wondering is it because of me using python, or if the algorithm is somewhat slow.

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

dreamoon_love_AA In problem E div2 something weird
I did ternary search in loop for 400 times and the max length of array is 200000 and I got TLE on testcase 15
I tried to submit the same code again I got TLE on testcase 21
http://mirror.codeforces.com/contest/579/submission/13052885
Then I changed 400 to 398 and I got ACCEPTED.
http://mirror.codeforces.com/contest/579/submission/13052699

can you please clarify that ,the same code got Accepted because I changed 400 to 398.
also the same code got TLE on different test cases.

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

    I've iterated 500 times & got AC. Try using std::ios_base::sync_with_stdio(0);cin.tie(0);

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

      I'm using std::ios_base::sync_with_stdio(0) but I didn't use cin.tie(0) I used it and got accepted but it's bad thing to make the time limit too strict

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

        I don't know the details of these but when u have to take too many inputs or output too many things, try using cin.tie(0) or cout.tie(0) for faster results. If in doubt, just go for scanf printf. That's what i learned (in the hard way of course).

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

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).

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

Why my Submissions are Skipped ??? I have solved two at Contest Time .

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

http://mirror.codeforces.com/contest/579/submission/13054131 Can someone tell me where I am making mistake.I know this was not expected time complexity and would result in TLE but still I am not able to find why its giving WA .

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

Can anyone explain why this dp fails for div2 problem D. solution : http://mirror.codeforces.com/contest/579/submission/13040454

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

Screencast with Arterm and discrete optimizations at MIPT

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

Please add tutorial link in Dashboard and problem page.

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