AlFlen's blog

By AlFlen, 7 months ago, translation, In English

The future is bulletproof
The aftermath is secondary
It's time to do it now and do it loud!

Hello, Codeforces!

74TrAkToR and I are glad to invite you to our Codeforces Round #705 (Div. 2), which will be held at Mar/06/2021 17:05 (Moscow time). Notice the unusual time of the round. The round will be rated for all the participants with rating strictly less than 2100.

We have already held a round and we have worked on errors:

  • the statements will be short and clear
  • we tried to make pretests stronger
  • the editorial will be published shortly after the round ends

We would like to thank everyone who helped us a lot with round preparation.

You will be given 6 problems. You will have 2 hours 15 minutes to solve them.

UPD: Score distribution $$$750-1250-1750-2250-2750-3250$$$.

UPD2: Editorial

UPD3: Congratulations to the winners!

Div. 2:

  1. sawa855

  2. buihoatpt2k9

  3. Totiniii

  4. rainboy

  5. scli_kws

Div. 1 + Div. 2:

  1. neal

  2. BigBag

  3. fastmath

  4. Heltion

  5. tute7627

We wish everyone good luck!

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

»
7 months ago, # |
  Vote: I like it +98 Vote: I do not like it

We will miss the main ponies from My Little Pony in this round. :(

»
7 months ago, # |
Rev. 2   Vote: I like it -63 Vote: I do not like it

.

»
7 months ago, # |
  Vote: I like it +41 Vote: I do not like it

the statemnts will be short and clear

»
7 months ago, # |
  Vote: I like it -8 Vote: I do not like it

Good luck!

»
7 months ago, # |
  Vote: I like it -37 Vote: I do not like it

div 3? when?

»
7 months ago, # |
  Vote: I like it +24 Vote: I do not like it

I think everyone love this line : the statements will be short and clear

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

this contest totally killing my rating :v

»
7 months ago, # |
  Vote: I like it +30 Vote: I do not like it

Finally became Specialist after a continuous +ve delta change in past 9 contest XD

»
7 months ago, # |
  Vote: I like it +24 Vote: I do not like it

the statements will be short and clear means challenging.

I like it.

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

    Do you know INGLISH? this means problem statements are not wordy.

  • »
    »
    7 months ago, # ^ |
    Rev. 2   Vote: I like it -18 Vote: I do not like it

    but pretest should be long and strong (just kidding I know that may result in a long queue)

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

      I want strong pretest.
      Failing test after passing pretest hurts more.

»
7 months ago, # |
  Vote: I like it +5 Vote: I do not like it

statements will be short and clear, strong pretests, and also hoping for nice problems.

»
7 months ago, # |
  Vote: I like it +13 Vote: I do not like it

Liked the intro :'3

»
7 months ago, # |
  Vote: I like it -81 Vote: I do not like it

Is it rated?

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

    No, You can give this in GYM section.

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

    Why do you guys even comment without reading the blog? @sanskar

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

    I've seen it in many blogs... Wondering why many people asking this kind of question. :(

»
7 months ago, # |
  Vote: I like it -10 Vote: I do not like it

Hope I can reach 1300 in this round :)

»
7 months ago, # |
  Vote: I like it +52 Vote: I do not like it

From the past 5 contests, I've been losing ratings consistently :/ I hope I'll break this streak in this contest :P. Wish me luck :)

»
7 months ago, # |
  Vote: I like it +10 Vote: I do not like it
  • Anton for not rejecting the problems.
»
7 months ago, # |
  Vote: I like it +21 Vote: I do not like it

74TrAkToR congrats on the first playoff win, well done!

»
7 months ago, # |
  Vote: I like it +5 Vote: I do not like it

I hope this time Question B is better than last contest

»
7 months ago, # |
  Vote: I like it +2 Vote: I do not like it

As a participant, wish you all satisfying rating changes :)

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

finally weekend contest

»
7 months ago, # |
  Vote: I like it +46 Vote: I do not like it
while(1) cout << "Na ";
»
7 months ago, # |
  Vote: I like it +7 Vote: I do not like it

I believe that you've got the key to hold a nice contest and this time I'll enjoy the problems!

Wait the coordinator is not Anton

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

    The problem setter doesn't enjoy the immense pleasure of rejected problems by our emperor anton. ;-)

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

    In your last contest C is bad(pretest is nothing),so this time I solve C first but C is still bad(example is nothing),so disappointing...

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I like the "the statements will be short and clear" part.

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

It feels awkward when you don't see any comment with As a tester.....

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

    As a tester, I think that it's a wonderful round

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

      As a participant, I think Div2B is most shit problem of 2021

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

        As a participant, I think you just said that cuz you haven't solved it yet

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Interactive problems will not be included in this contest right. I have doubt because this contest is of 2 hours and 15 min

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

And here I am hoping to touch the 1500s but falling back to square 1 everytime ... BUT codeforces is love <3.

»
7 months ago, # |
  Vote: I like it +23 Vote: I do not like it

2 Div1's after this contest are ruining my chances of becoming an Expert.

»
7 months ago, # |
  Vote: I like it +24 Vote: I do not like it

My 69th contest. Hope to reach current year in rating

»
7 months ago, # |
Rev. 4   Vote: I like it +11 Vote: I do not like it

It will be very good if the statements of problems will not contain any legends, stories or histories. And then the problems will be easy to understand.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

This is going to be my 50th contest and I am still stuck on grey. Someone, please guide me.

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

    -> I can see you are pretty comfortable with problem A , So I will advise you to up solve problem B of every div 2 round.

    -> practice daily , I can see you are not regular in doing problems , its fine even if you do just 2 or 3 on a busy day but do it regularly.

    -> Whenever you come across a new concept (eg : prefix sum, binary search) learn that concept and solve few problems on that.

    -> solve problems slightly higher than your rating , for you case solve up to 1400. and solve problems with different tags not just brute force and constructive.

    May this helps

»
7 months ago, # |
  Vote: I like it +1 Vote: I do not like it
Spoiler
»
7 months ago, # |
  Vote: I like it +8 Vote: I do not like it

just wanna tell u, it inspired me !

`The future is bulletproof`
`The aftermath is secondary`
`It's time to do it now and do it loud!`
»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope to become cyan in this contest.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

the statements will be short and clear

ONE LOVE

»
7 months ago, # |
Rev. 2   Vote: I like it +23 Vote: I do not like it

Little suggestion: the competition announcement should include a link to the competition: Codeforces Round #705 (Div. 2) but not Codeforces Round #366 (Div. 2)
UPD: Have been fixed :)

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

All participants get happy when they read this: The statements will be short and clear.

It is very fun. Thanks AlFlen and 74TrAkToR for this round!!

»
7 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Note: unusual time it will start at 14:05 not 14:35 UTC

»
7 months ago, # |
  Vote: I like it +3 Vote: I do not like it

As a...

Hope strong pretests XD

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

Hoping that this contest will make me pupil. See my rating :))

»
7 months ago, # |
  Vote: I like it -50 Vote: I do not like it

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    what about those who can't even find a solution ? :(

»
7 months ago, # |
  Vote: I like it +32 Vote: I do not like it

This scoring distribution has partial Div1 vibes

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The scoring distribution is quite different from normal div.2!

»
7 months ago, # |
  Vote: I like it +33 Vote: I do not like it

Div 1.5 coming!!!

»
7 months ago, # |
  Vote: I like it +11 Vote: I do not like it

everything harder than usual forces?

»
7 months ago, # |
  Vote: I like it +10 Vote: I do not like it

So i have reached college and this will be my first contest from my hostel. Me and my 4 friends are also participating today alongside me. Super Excited for this round and Good Luck to all ..

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

    Please don't cheat if you are participating alongside :P

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

      No bruh, he is my best friend and his only goal is to compete me.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Score distribution looks scary for us!(newbies).

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The time(2h15min) maybe means the contest is a hard one. I will try my best to solve it. Good luck to me, and to everyone.

Stay Cheeki Breeki!

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

please open the registration please please :(((

»
7 months ago, # |
  Vote: I like it +17 Vote: I do not like it

"the statements will be short and clear"...meanwhile problem B: Am I joke?

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

    At least the statement is clear but I doubt short...
    P.S. Just for Div.2B...

»
7 months ago, # |
  Vote: I like it +38 Vote: I do not like it

I swear I will throw all digital clocks far away from my house after this round.

»
7 months ago, # |
  Vote: I like it -22 Vote: I do not like it

In the 3rd test case of problem B. Why is 52:26 invalid

  • »
    »
    7 months ago, # ^ |
    Rev. 2   Vote: I like it -22 Vote: I do not like it

    [Deleted: Sorry I thought it would be a silly doubt and so didnot bother to ask directly ther , But i will remember that! ]

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

    You're not allowed to ask here, you can ask in the "Ask a question" section.

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

Are you high while making the question??

»
7 months ago, # |
  Vote: I like it +26 Vote: I do not like it

I've never seen a contest so full of cancer before

»
7 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Submit Code button not working.

»
7 months ago, # |
  Vote: I like it -8 Vote: I do not like it

I guess statement size and difficulty is inversely proportional on Forces nowadays.. :-(

»
7 months ago, # |
  Vote: I like it +25 Vote: I do not like it

Dear antontrygubO_o please coordinate every codeforces round and never let this kind of shit pass,taking part in it is just a waste of time!

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

    Even if you have a bad experience of the contest, please respect the work of the authors and the testers. Making a contest is not as easy as you think.

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

      I'd argue that comment is aimed more at the coordinator than the setters. I'd say its pretty normal as a setter to sometimes think a problem is nicer than it actually is. Its the coordinator's job to ensure that the problem quality is up to the standards of the platform.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    To tell the truth, the experience of this round is truly bad. But your words maybe too extreme...

»
7 months ago, # |
  Vote: I like it +12 Vote: I do not like it

toxic comments should be removed just make constructive criticism or don't I don't see it as a bad round A was ok B wasn't easy to code and C was hard to think about so each problem from A B C makes you try to improve in something which is good if a problem looks bad for you that doesn't mean it's bad others might like the problem you hated and might hate a problem you like

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

    I had a stroke reading that

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Well you're mad from your WA in A so I won't blame you

      • »
        »
        »
        »
        7 months ago, # ^ |
        Rev. 2   Vote: I like it -8 Vote: I do not like it

        Oh I'm not (actually the other way around), you're triggered cuz of my simple comment on your punctuation

        • »
          »
          »
          »
          »
          7 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          You're completely wrong about that What you said doesn't mean anything so I'm not triggered about it at all

»
7 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Test Case 3 of D is killing me!!!!

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Help me with D once the contest's over.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    yes bro you are god

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

    Segment tree

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

    Create for every prime number $$$t$$$ segment tree, that will store array $$$p_{1}, \dots$$$ such that $$$p_{i}$$$ is equal to degree of factor $$$t$$$ in number $$$a_{i}$$$. Assume we multiply $$$a_{i}$$$ by $$$x$$$. Factorize $$$x$$$. For every factor add his degree to appropriate segment tree and check, if the minimum on whole segment $$$[1,n]$$$ become bigger. If so, multiply result buy factor $$$newmin - oldmin$$$ times. But $$$18000$$$ segment trees with sizes $$$n$$$ need much memory, so notice, that the value for segment tree can become bigger that zero not earlier, than $$$n$$$ queries for this segment tree was applied. So we will just store queries for every segment tree in array and once the number become $$$\ge n$$$ apply all them to appropriate segment tree. After this, apply all queries to this segment tree immediately.

»
7 months ago, # |
  Vote: I like it +56 Vote: I do not like it

The worst B I've ever seen...

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I totally agree, implementation heavy B atleast for me :( I just got last 15mins to solve D :(

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I spent 25 min solving B...
    No FST plz!!!

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

A-ez

B-ez

C-No idea how to even approach

D-No idea how to solve in time.

Overall a good round and very awesome C and D. Though the difficulty gap from B to C felt too big but anyways....Thanks setters!

»
7 months ago, # |
  Vote: I like it +5 Vote: I do not like it
»
7 months ago, # |
  Vote: I like it +117 Vote: I do not like it

Disclaimer: I realize the authors work hard to set problems and I appreciate that, the following are just my thoughts about problems like this contest's Div2B in general.

Just why... it takes barely any time to arrive at the solution for problem B, but then becomes a really bad implementation problem if you're not being careful.

I thought the majority of the community agreed that these types of problems weren't interesting at all.

I mean what is the purpose of problem B in a Div2? Is it just there to ensure that people new to competitive coding will have something to spend the contest implementing?

In my opinion B should be an elegant idea that it is possible for newer participants to solve after thinking about it for a while. It should be something that makes them satisfied (or even better, amazed) when they solve it (or read the editorial). Remember, this is the problem that will make the biggest impression on a lot of people who are fairly new to competitive coding.

I get it, original interesting ideas that are easy can be difficult to think of, but at least try to come up with something slightly interesting that isn't an utter and complete pain to code. For example — problem A, its a fairly nice idea that isn't too tough.

People rant (or joke) about antontrygubO_o rejecting a ton of problems, but frankly I think that's a good thing if it is to remove problems like this one.

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

    I totally agree with you, the best part of codeforces rounds are logic/ideas behind each and every problem there in contest. But if we see problems like B then I don't think people would appreciate the round, and it may be uninteresting for many participants.

    Even a single problem like B can spoil complete round.

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

    Exactly, problem B was quite dumb as it was just brainless implementation

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

    I agree with everything you said. Problem B was a bad problem even for Div2 (which is usually not the best in terms of beauty and originality).

    However, I want to put in a good word for the authors. Problem B wasn't all that implementation-heavy (I mean, I've seen worse). Part -- or should I say, the entirety -- of the challenge to overcome was to find a sensible way to translate the idea into code, which wouldn't lead to a complete mess. And if done right, the implementation is actually quite short.

    I've seen this same theme reappear in problem D. One could, in theory, solve it by means of segment trees (which, at least in my case, is the first thing that comes to mind), but that solution is hell to implement. Here, again, the challenge was coming up with a good approach. This one I enjoyed solving.

    Of course, I'm not saying that B and D are on the same level, not even close. Problems like B should be eradicated, period. I'm just saying that the implementation alone is not bad enough to justify such a negative feedback.

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

    Todays B and C would have perfectly fit in educational contest, since there are often implementation heavy problems which feel like school homework.

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      You guys are getting this kind of school homework? I find homework way more boring than any problem on CF. The typical homework in my school is "draw the plot of $$$\frac{1}{2}^{\frac{2+|x-1|}{3-|2x|}}$$$".

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

    I think these types of problems are good for A and B. Sure I didn't have to think theoretically at all, but I had to think more overall than normal trying to figure out how to implement, and had to think about actual coding in a coding contest rather than just basic mafs.

    As far as for beginners, who they're for, beginners often don't have basic implementation skills and when joining a programming contest with almost no programming for the problems they see would leave a bad impression for me, as I would not expect to feel like i'm in grade school math writing equations but actually programming.

    Also people who think these are "implementation heavy" surely have never done a single hard cp problem, or severely need to practice implementation...

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I think the term "implementation heavy" needs to be explained. I use it not to describe the difficulty of a problem, but the ratio of creativity and work to do to solve it.

      See Connect the Dots as an example for a simple implementation heavy problem.

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

        I believe a problem can need creativity and thinking for its implementation, which others either don't believe or, what I think is more likely, seem to purposely exclude that type of thinking ability. JOI Port Facility is a great example where solving on paper is not too hard but figuring out how to execute such an idea takes work.

        Also, I believe when people call such problems as you gave for an example a "implementation heavy" problem, they just have very poor implementations that can be greatly condensed. My implementation for that problem would be likely around ~50 lines including template. Is that still a high ratio to you? Is my implementation to B from this contest a high ratio to you? If so, then ig we just have different ideas on what defines such ratio, though keep in mind this is a "programming" contest. But otherwise, it is your own fault for not taking the time to think of how to write a nice solution, which in a timed setting is a part of the thinking and contest.

        Problem A and B are basically always going to be close to 0 brain for anyone at least my level, so imo why not at least add an aspect of implementation thinking necessary to solve? And I think having too low an implementation to thinking ratio makes it a math problem not fit for cp.

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

Statement of B has been changed without any announce, and "future" also means "now" ? Very bad experience.

»
7 months ago, # |
  Vote: I like it +1 Vote: I do not like it

How to solve B non-implementation heavily?

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

    sadly, it was a pure implementation-based question.

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

    I think that my implementation came out well: https://codeforces.com/contest/1493/submission/109236256

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

    You can slightly clean up the implementation by processing the reflection using maps and performing it on strings to avoid the pain with leading zeros while reversing, but I don't think there is a way to make it properly clean.

    Edit: My attempt at coding it in a clean-ish manner — 109282647

  • »
    »
    7 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it
    Spoiler

    `

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

    You could have simplified it additionally with:

    1.Brute-forcing it and verifying if it's correct. I think the more optimal version was probably uglier.

    2.In C/C++ you could have read the hour and minute separately when they had : between them simply with

    scanf("%d:%d", &h, &m)

    1. And pad with zeroes with a bit of printf magic: printf("%02d:%02d", h, m)
  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    If you can use python, a lot of the annoying parts are pretty smooth (parsing the string to int, reversing the strings, padding with 0): 109244789

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think this is pretty ok: 109352844

»
7 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Why does Segment Tree implementation TLE for D?

»
7 months ago, # |
  Vote: I like it +12 Vote: I do not like it

How to solve C?

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

    greedy, move from the end, try to change s[i] to be >= s[i].

    i.e s[i] to 'z'

    then you just need to calculate the remaining characters and see if all of them are divisible by k if not you can take from the characters after s[i] as much as you want to make it divisible by k, if there's still remaining characters after s[i] you didn't replace you just need to replace it with 'a' and make sure it's also divisible by k.

»
7 months ago, # |
  Vote: I like it +3 Vote: I do not like it

What was the desired complexity for the problem D?

My solution idea which didn't pass was as follows.

Number of primes in the possible gcd across all the queries would be pretty few. So, we iterate over each prime p, and count its contribution for each query. My time complexity was #(number of possible gcds) * n * log n.

But it didn't pass, gave TLE on test #4.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    how can you calculate number of possible gcds? Anyways I think my solns worst case time complexity was $$$O(n \log^2n)$$$

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      For each prime number p, I checked whether it is a divisor of each a[i] (including the numbers in the queries as well). Basically, I maintain for each prime, the positions in the array where it appeared (including queries) and check whether the cnt of positions >= n or not.

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Can anyone tell why the solution to D will not exceed the memory limit. As in my accepted solution I am creating a map of multiset of the number of each prime that I am getting. and in worst case, if a prime is present in all n elements then the size of this map of multiset will be (2*1e5)*20000 memory (as there are more than 20000 primes from 2 to 2e5), which is too huge to pass. But I am not sure how it is getting accepted?

      • »
        »
        »
        »
        7 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Given that there are 200 000 queries that change just one element, it is highly unlikely for many primes to have many elements they are part of. If every element was a prime and every query was a prime, you would have about 10 primes at most that were used by all elements (given your calculus of 20 000 primes). And realistically, given that 2^18 is about 200 000, an element will have at most 18 primes (even less, since pretty much all primes are bigger than 2). Those two realisations alone should help you figure out about how many elements could be maximally in the maps.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    instead iterate over each prime present in x and add their contribution to new GCD.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve B DIV 2??

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

    Just iterate naively and check whether the time is interesting or not.

»
7 months ago, # |
  Vote: I like it +50 Vote: I do not like it

So I spent the whole round (A-D) going like : ok this is obvious. Now lets write 300 lines of code.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

can someone please help me in D, getting WA on pretest 3 :(

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Please i am having a hard time to find the error if anyone have sometime to spare please tell me what i am missing in my solution/ https://codeforces.com/contest/1493/submission/109266067

thanks

»
7 months ago, # |
  Vote: I like it +2 Vote: I do not like it

the statements will be short and clear== False

The statments of B was not too much clear :)

»
7 months ago, # |
  Vote: I like it +33 Vote: I do not like it

The future is grey

The aftermath is negative delta

It's time to implement it now and do it forever!

»
7 months ago, # |
  Vote: I like it +21 Vote: I do not like it

Implementationforces!!

»
7 months ago, # |
Rev. 2   Vote: I like it +25 Vote: I do not like it

Boring problem b, I don't like problems that don't really require any thinking(and just implementation) and probably most people don't tbh.

»
7 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Hmm I think the time limit for Problem D was a bit too tight.

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

    Agreed. I spent whole contest in constant optimizations for this problem :(

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

B should've been C, C should've been D or E.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anybody please help me in figuring out whats wrong in my solution for Problem B Code

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    50:00 in the mirror would be 00:02. But your code gives 00:05. You didn't flip the digits

    I made the same mistake.

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

[DELETED]

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

First of all, I want to thank the contest setters for putting their time and effort into this contest. I understand that a lot goes into this. However, I don't understand how anyone could have thought it was a good idea to make B. The main thing I like about codeforces is the clever solutions for problems. However, problem B was a completely boring implementation problem with absolutly no thinking. I hope that this is the last time a problem like this is set.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Problem D can be solved using Segment Tree?

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

    My question is also the same. Nothing different. No difference.

    Translation: Have you ever got this type of pretests failure after writing 150+ lines of code with SegTree, seive, etc.?

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

      One of my friend Zesty_Fox faced the same situation :TLE #4 -> MLE #6...

      Here is what he submit in D. I found him debugging this problem until 1a.m.(UTC+8)...

»
7 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Nice problem set, but imo C & D were not worth 1750 & 2250 respectively. 1500 & 2000 would have been a better score for them.

»
7 months ago, # |
  Vote: I like it +2 Vote: I do not like it

weak pretest for D...

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi. I liked the problems. But this one was harder than an usual div 2.

problem B, C and D are a bit hard to implement.

But beautiful problems!! nice job!

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone please tell why am i getting TLE verdict on pretest 2 in problem B. My solution : https://codeforces.com/contest/1493/submission/109258021

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

For problem B, a test case in pretest 2, why answer of 50 3 30:00 is 50:00 ? isn't The time in the mirror (00:05) illegal, the minutes is larger than 3

»
7 months ago, # |
  Vote: I like it +12 Vote: I do not like it

Memes kill frustration

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The round is too implementation-heavy to my liking

»
7 months ago, # |
  Vote: I like it +8 Vote: I do not like it

C was not C

»
7 months ago, # |
  Vote: I like it +24 Vote: I do not like it

I think the round was good. Yes, there was an implementation in it, but the tasks were not without ideas (except for task B, but with the help of it it was possible to create a struggle between div3 participants, since they scored different points). Also, the round has a good balance of tasks (many div2 participants solved either C or D)

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

No offense. The Problem C(K-beautiful Strings) may need to be declared that the length of string s is n. I find some accepted codes couldn't work when the length of s isn't n. Or maybe I'm missing something.

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

    This is not true, in our checker all this is taken into account.

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

    In the input section n is denoted as the length of string s

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

      I agree it's in the problem statement, but it was hard for me to find (I had to re-read a few times).

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It's written in the problem statement.

    The first line of the description contains two integers n and k (1≤n≤k≤105) — the length of string s and number k respectively.

»
7 months ago, # |
  Vote: I like it +57 Vote: I do not like it

To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove cheaters and update the ratings again!

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Hi Mike,

    During contest I submitted code in C++11[submission:109246439] and it gave TLE during system testing and again I submitted same code in C++14[submission:109283562] after system test it seems to pass? Please look into it i will loose lot of rating points

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Why copypast strings (in reflect twice copypasting)? Can't check now but my guess that compiler with c++11 just can't optimize this.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The preliminarily is awesome, thank you! I hope we'll have this in future rounds because I'm very excited to see the rating change that I used to wait until the rating is updated which could take hours after the contest.

  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I got message that my solution of problem A matches with other guy. Solution of A was too trivial, so it may match with other. My sol — 109233079 Other Sol — 109231770

    MikeMirzayanov AlFlen KAN

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Have you forgotten to change rating? QAQ

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Second question was a question lol!

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

My Code for C is failing on 170th Case of Test Case 3 . Can Anyone please share how Can get That test Case , I want to upsolve but unable to find The Failing Case .

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

    Sadly I think that's impossible it happened to me several times and I searched alot about it but found nothing

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

    I wish a new feature would be added by which the person searches for the test case that he wants, and it appears to him, and in this way we get rid of the annoyance that afflicts programmers :)

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yes , There should such be such a feature . We always tend to find error in our own code by looking at the test cases , but when these cases our not visible to us and our code is complex enough we are unable to upsolve it. Codeforces Team should make Provision of Test Cases after the contest so that we can find the mistakes in own code and learn from it

  • »
    »
    7 months ago, # ^ |
    Rev. 11   Vote: I like it +19 Vote: I do not like it

    I know this solution is not scalable but it might help in some cases.

    1. Observe that Test cases 1 and 2 have less that 100 cases.
    2. Add a conditional before each standard output to work only if(t<100)
    3. Now we want input of 170th case in Test case 3. So instead of your output just print the input again when t>100 and case is 170.

    Something like this:

    cin>>t;

    for(int case=1;case<=t; case++){

    int n,k; cin>>n>>k;
     string s; cin>>s;
     if(t<100){
        // solve problem and output
     }else if(case==170){
         cout<<n<<endl;
         cout<<k<<endl;
         cout<<s<<;
         exit(0);
     }

    }

    Using this I got, n=4 k=2 s=acad

    as 170th case of Test Case 3

    • »
      »
      »
      7 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Hi I actually Tried This for(ll T=1;T<=t;T++) {

      cin>>n>>k;
      cin>>s;
      if(T==170) cout<<s<<"\n";
      .....

      } at the 170th case I was printing The input as output the the verdict was : wrong answer The string is not beautiful (test case 170) which clearly Implies that the test case 170 was not what you are saying . Thanks anyways.

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

        Hi,

        I have corrected the typo in original comment. It is actually s="acad" instead of s="acac" for that case. May be still I have done some mistake while getting the 170th case but you can use this idea for getting it by yourself.

        Also, I suspect that in your original solution you have printed some output twice or nothing for some case before case 170. That's why you might be getting a different judgement.

        Also, I checked with your code and found that for: n=4, k=2, s=acad

        Your output is "acac" which is lexicographically less that s. You might use this for some additional debugging.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone please help me to solve problem C by taking an example, thank you in advance

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

just sad to know that i had gotten fst in B because of my bad coding logic and style

»
7 months ago, # |
  Vote: I like it -6 Vote: I do not like it

Sorry but it was a coincidence .. My compiler wasn't working right. So, I have published my code on ideone.com for compiling. That's why the problem has occurred. It won't happen again.

»
7 months ago, # |
Rev. 2   Vote: I like it -19 Vote: I do not like it

Hi MikeMirzayanov, I received a message from CF stating that my Solution for problem A for Contest 705 Div2 -lakshya492/109235173 coincides with solution 9851551/109233522. I assure that there has been no sharing or leakage from my side. I never use ideone.

My submission link: 109235173 Coinciding code link: 109233522

I request you to look once again at both the codes and understand that whatever the similarities are in both codes they are very likely to happen as the The problem A had a very small code because of which there is a very high chance of coinciding with someone else's. I hope my ratings will not be rolled back and all my submitted solutions will be unskipped.

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

    This is exactly how the institution of reputation works:

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

      Yes I have plagiarized code once before, but that was the first and last time. I never even commented anything then because I felt guilty and learnt from it, it was never repeated again. I have worked hard at data structures and algorithms since then to become better at CP. I assure you I am the author of my submission and any similarities are pure coincidence due to the fact that div2 A problems have usually very short solutions. Please understand.

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

Can someone please help me why I'm getting runtime error in my submission for problemD: https://codeforces.com/contest/1493/submission/111289467? I thought it might be because of memory allocation but saw that author has implemented the solution with same memory requirements as mine. Please let me know where I'm making mistake. Thanks in advance!!!