SlavicG's blog

By SlavicG, history, 11 months ago, In English

Hey, hi Codeforces!

It's mesanu, flamestorm and me and we are very excited to invite you to Codeforces Round 871 (Div. 4)! It starts on May/06/2023 17:35 (Moscow time).

We worked swiftly to tailor the problems for this contest, so we hope you will enjoy them! We tried to make the statements short, epic and concise.

The format of the event will be identical to Div. 3 rounds:

  • 5-8 tasks;
  • ICPC rules with a penalty of 10 minutes for an incorrect submission;
  • 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
  • after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
  • by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them),
  • do not have a point of 1400 or higher in the rating.

Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), then the round will be rated for you.

Many thanks to all testers: RedstoneGamer22, tibinyte, sandry24, jampm, haochenkang, qwexd, Vladosiya, _Vanilla_, Phantom_Performer, ScarletS, NintsiChkhaidze, keta_tsimakuridze, Dominater069, Gheal, Bakry!

And thanks to Vladosiya for russian statement translations!

We suggest reading all of the problems and hope you will find them interesting!

Good Luck and have fun!!

Are you ready for it?

UPD: Editorial is out!

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

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

As a tester, problems are great!

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

    Contest with short statements are always good.So,I hope we'll enjoy this div 4 and wish for the positive results.

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

      The round was amazing. I especially liked problem F with a graph.

»
11 months ago, # |
  Vote: I like it -17 Vote: I do not like it
Click for positive delta
»
11 months ago, # |
  Vote: I like it +140 Vote: I do not like it

As a tester, I recommend listening to Taylor Swift while participating in this round.

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

queue

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

    Gheez, smooth round..nice problemset but I think F was way easier than E

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

excited for it

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

so trash contest xD

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

Damn excited for this round. Hope I will become master after this round

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

As a tester, I won't make clickbaiting claims and I won't beg for upvotes.

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

Ya slavicG div4 contest

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

in queue

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

I am very excited for another Division 4 Round; hoping to stay as a stable Pupil!

Good luck to all other participants and thanks for making the round!

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

New specialist (including me and 69 others) in div4 comments section,,,

IMG-3731

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

I am really excited to participate in a Div4 contest on my birthday, and also hoping for positive delta!

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

Just +20 to get to pupil. Hope i will do it tomorrow

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

    for me just 48.I wish you all the best

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

    Seems like i will made pupil. delta prediction is +66 and i just need +20. I think this time it is great. I was able to solve 6/8 problem in less than 1h25min but G i had TL and solved it just at the end of contest unfortunately.

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

Good Luck for everyone I hope to be pupil

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

As a tester, this is surprisingly not that bad for a Div. 4

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

    As a tester, I'm not sure I agree

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

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

    I am seeing the same meme for the past 3 years on Codeforces. At least post something else.

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

Praying for +14 delta

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

It's my first "out of competition" contest after a great success on round #870 lol.

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

Hope I would get a +ve Delta and become the pupil in this round.

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

As usual I liked the cat in Vladosiya's profile.(´◡`)

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

thank you very much!!

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

Finally div 4...

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

Thanks

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

Are you ready for it?

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

I am a beginner. How difficult is Div4?

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

    Give a glance to the previous div.4 contests.

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

    That type of contest is the best for you at the moment. Cuz you feel more confident and find some extra power to continue).

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

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

This part is amazing!)

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

Although I am unrated, I still want to participate. Is there anyone else who feels the same as me?

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

Hope everybody solve all problems!

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

After the total disaster of yesterday div2 contest, I hope to do better today. But I am not sure I Will have time...

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

The legand says that i am in queue from the last div 4

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

As a participant, hope to reach cyan.

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

There was no queue today..thanks

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

Let's hope to get +13 today. I am really bored of the gray color

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

half hrs left i'm feeling nervous :)

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

Hope to surpass 700 rating mark today, still lot of ground to cover !!

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

Hello everyone! Have a great round and a good mood.

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

Queue Forces!!!!

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

Very fast loading and queue for div4! Pretty nice, Good Job Codeforces team!

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

nice Taylor Swift round.

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

Good contest, quit after solving 2 problems.

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

    Good contest, quit after speedforcing first 6 problems and being too dumb for G and H.

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

Taylor Swift Round 871!

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

    Have you noticed the references in the announcement?

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

Today's contest was really fun and interesting. Appreciate the problem setters :)

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

Very good problems, especially H. Thanks to the authors for a cool contest.

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

Nice problems. i liked G and H more

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

Solution of Blank Space — 871B Question with code and explanation of it

https://codeforcer.blogspot.com/2023/05/bla.html

Solution of Mr. Perfectly Fine — 871C Question with code and explanation of it

https://codeforcer.blogspot.com/2023/05/perfectly%20fine.html

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

Single people after reading problem A:

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

How to solve D? used BFS for each N, but got TLE.

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

Short Editorial :

  • A : Iterate over the string and count where the characters differ.
  • B : Count the maximum consecutive zeros in the array.
  • C : The answer is -1 if either of the string value is zero for all n books. Otherwise ans=min(fir+sec,both) where fir-minimum mi with si1=1,sec=minimum mi with si2=1,both=minimum mi with s11=1 and s12=1.
  • D : If m>n, answer is no.we can only divide n if n is a multiple of 3 into pieces n/3 and 2*n/3.Thus, m/n=2^x/3^y where x<=y, iterate for all possible y(3^y<=10^7 , y<=15 ) and find if any integer x satisfies the equation.
  • E : Basic BFS or DFS question.
  • F : From the properties , we can see that m=(y+1)*x,n=1+x*(y+1),find degree of all nodes.Now, x*y nodes will have deg=1,x nodes will have deg=y+1 and 1 node will have deg=x.
  • G : Initialize sum=n*n for each n<=1e6, now take prefix sum of both both type of all diagonals and you have your answer. For example- initially sum[13]=13*13,sum[9]=9*9,sum[8]=8*8,sum[4]=4*4, after taking prefix sum of right to let type of diagonals, sum[13]=13*13+9*9+6*6,sum[9]=9*9+6*6,sum[8]=8*8+5*5+3*3, sum[4]=4*4+2*2+1*1,taking prefix sum of left to right type of diagonals, sum[4]=4*4+2*2+1*1 , sum[8]=8*8+5*5+3*3+sum[4], sum[13]=13*13+9*9+6*6+sum[8].
  • H :Since each qi<=63, AND of any subsequence <=63,Initialise array of size 64 where value of dp[i] is equal to total number of subsequences having AND value i.Now, traverse through the array ,for a value v[i] we take it's AND with all possible values [0,63] and update dp accordingly. Finally, add all dp[i] where number of bits in i is k. See 204835949 for implementation.
  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    what would be the actual rating of G and H according to you? I guess something around 1500 for G and maybe 1800 H

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

    In problem F, if the values of both x and y are greater than 1, values of n & m should at least be 7 & 6 respectively, right? But the problem statement says that n can be 2 and m can be 1 [2≤n≤200; 1≤m≤min(1000,n(n−1)2)]...essentially meaning x can be 1 and y can be 0! I'm a bit confused about how to handle such cases of input as my solution got WA.

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

      For an input to be valid, all constraints have to be fulfilled. These are the two different constraints you're thinking about:

      1. $$$2 \le n \le 200$$$; $$$1 \le m \le \min(1000, \frac{n(n−1)}{2})$$$
      2. It is guaranteed that this graph is a snowflake graph for some integers $$$x$$$ and $$$y$$$ both greater than $$$1$$$.

      It doesn't matter that constraint 1 allows cases like $$$n = 2$$$ or $$$m = 1$$$ since these are impossible according to constraint 2. As I said, all constraints have to be met for an input to be valid. Thus, these cases can never appear and you don't need to consider them in your code.

      UPD: The reason you got WA is because there is an edge case you missed. Here is one test case where your code fails:

      Spoiler

      Can you see why this happens?

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

        Hint: The edge case scenario is described in the editorial.

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

        Hey, thanks vgtcross! But I already did solve it right after you said those two were different constraints I have to think about. That helped me immediately notice that the only possible edge case I have to think about is that the center node and the intermediate nodes can have an equal count of degrees. But thanks all the same...you've been helpful.

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

can anyone help me with prove the complexity of my code on D? thanks: https://codeforces.com/contest/1829/submission/204812242

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

Nice contest !!

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

I am very glad that my idea (see https://codeforces.com/blog/entry/114062#comment-1014185) worked and there was no queue today!

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

Any tips on how to avoid Runtime error on problems like Problem E: The Lakes ?

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

    maybe you too took m as n.

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

    Stack frames + the visited array are using too much memory, probably. Since it worked without the visited array.

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

Great Contest.

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

In F , according to the constraints , if m = 1 , then how x and y could be both greater than 1 such that x*(y+1) = m = 1 ??

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

    Since inputs are always valid, $$$m$$$ cannot equal 1. Even though the constraint $$$1 \le m \le \min(1000 , \frac{n(n−1)}{2})$$$ allows it, no valid snowflake graph can have only 1 edge. The constraint "It is guaranteed that this graph is a snowflake graph for some integers x and y both greater than 1" "overrides" the fact that $$$m = 1$$$ is allowed by the previous constraint.

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

      ah ok , seems right m can't be a prime number , this thing confused me during the contest:(

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

Solution of A.Love Story — 871A Question with code and explanation of it

https://codeforcer.blogspot.com/2023/05/love%20story.html

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

    why do we need tutorial of A? Everyone can do it with ease.

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

      You are very talented btw, it was not for you. so kindly ignore it. instead of talking for the solution you can talk about approach too. btw the way thanks for commenting out.

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

TAYLOR SWIFT REFFERENCES!? AFTER HER SPEAK NOW TAYLOR’S VERSION ANNOUCEMENT!? I CANNOT-

(sorry for all caps i’m just a big swifty :>)

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

    Did you notice the references in the announcement?

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

      yeah... but only after the contest though cause i didn't read the announcement beforehand :'), sorry...

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

Finally Solved my first dp question in live contest. Despite Div 4, happiness nd motivation bcz of DP is overflowing :)

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

    how did you reach Specialist without knowing Dynamic programming?

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

      note the word live contest, he never said its his first dp solve, he said its first dp solve in live contest.

      This is because other contests unlike div4 wont give a problem which is just knowing dp, but you need to make other harder observations on top of them.

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

Can somebody explain me why this solution got TLE?

https://codeforces.com/contest/1829/submission/204844540

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

    You cannot clear the $$$1000 \times 1000$$$ arrays matr or vis completely every time if there are $$$10\ 000$$$ test cases since this would require $$$1000 \cdot 1000 \cdot 10\ 000 = 10^{10}$$$ operations which is not fast enough. Even though memset is fast, it's only a constant factor improvement over manual clearing. You should just clear the arrays manually in the required sections for each test case.

    UPD: You should also increase your arrays matr and vis to $$$1002 \times 1002$$$ from $$$1001 \times 1001$$$ so that you have the exrta "buffer layer" on every side of the used area. 204881319

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

Overall a great round. Well-balanced Problem Set. Although standard ideas were involved, but liked Problems G and H especially. Good educational problems for DP I would say.

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

    Ya I totally agree, the problems were like "INTRODUCTION TO TREE,GRAPH,DP,etc"

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

so glad that we finally have the first div.4 contest that runs smoothly

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

This was a really nice contest! I particularly enjoyed G and H. (D was also nice.)

I bashed E with DSU ;)

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

Good contest! It makes me know that small mistakes will lead to fatal errors.(In details,I misused variables in for-loops for consecutive 3 problems and wasted plenty of time to fix them....)

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

The best round ever, i like the problems of dfs and bfs, Thank you.

I've TLE in G because of not answering each query in O(1), when handling it with a "calm mind" after the round it passed so sad :( (

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

Finally, solved all.

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

How to solve H for 1 <= a[i] <= 1e9 ?

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

Hint for G. Hits Different ?

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

    Precalculate max(max_i), and min(min_i) values of each row(i). You can calculate Sum(i^2) from i=a to b in O(1). First find row where N is(R). Each row(R, R-1, ... 0) you can calculate start and end numbers of can that falls(Using previous rows start and end number + max_i and min_i). And add SUM(Start, end number) to the answer.

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

E was exactly same as https://leetcode.com/contest/biweekly-contest-103/problems/maximum-number-of-fish-in-a-grid/

If someone copies my code from here is there any chance that my solution can get skipped?

Also this question is from latest biweekly contest on leet code. How can there be soo similar question again on CF.

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

    How would someone would copy your code from there except you? i don't think so your solution will be skipped, coz i also copied my code from old submission

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

      Solutions are visible in contest leaderboard

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

    its a very standard problem, and every tester told the same in testing, however apparently, having standard problems in div4 is fine.

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

      and for having those standard problems, beginners can reinforce their newly learnt concepts and algorithms too! so i don't think it's a big deal after all in my opinion

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

        yes, sure, just make those contests unrated then. In my opinion, rated contests should not be having standard problems.

        CSES exists, other tons of archives exists. Beginners can solve standard problems from there. They should not be getting rating for copy pasting codes to standard problems.

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

          if they know all standard problems than they aren't Beginners at all :3

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

            Disagree, a person can know 1000 standard problems and still unable to solve a div2A because they have not seen it before.

            This type of person is what this div4 round encourage :(

            Maybe i am wrong, but most other div4 rounds dont have classical problems atleast in hardest slot, and as mentioned above, E is literally a leetcode problem.

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

              well, with your perspective a lgm can consider a certain problem standard which might still be out of your knowledge, also most of the problem in div2 that they solve might be of some similar concept which they would have already seen in the past, so that doesn't mean the problems like that shouldn't be created just because they felt it quite reused and standard. Hope i was able to say my point clearly

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

                I think there is a big difference in making a standard problem, and having a problem be standard to someone. Today's E and H are examples of the former.

                I cant find any examples of the former in recent div2 rounds, even if they need standard knowledge, they are not just that. You need to make some observations after that. Perhaps you can enlighten me to some problems i missed which are completely standard in div2(in recent times and preferably one of the easier ones not F or smth)

                As for the lgm point, yes there are definitely such problems which an lgm would find standard and i still cant solve. I dont see whats wrong with that. The lgm(hopefully) and me would oppose putting such problems in a div1 round.

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

          yeahh, actually i agree with you on that. overall i do think the later problems in the contest are less dificult compared to the other div 4s. nevertheless, the problems are still interesting and the contest is one of my favorites so far!!! :>

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

            Its not about the difficulty. A slightly easier contest is fine. One cannot always have the correct difficulty.

            However, i think all rated rounds should have original problems. bad problems are better than unoriginal ones.

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

Can someone explain G in more detail or how the code is working? Thanks!!

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

I am curious, was the theme determined after the announcement of her new album or are they unrelated?

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

    The announcement of her new album was determined based on the theme.

    But in all seriousness... it was a coincidence she announced it on the same day :D We had the theme set for quite some time before it.

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

    The collaboration I never knew I needed.

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

This contest has given me a very big motivation ( and hopefully a very big rating :) ). Thank you for the creators of this contest, I really liked problems, especially the problem H.

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

The contest was great

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

Cool contest, last 3 problems were interesting and at a good difficulty level for myself.

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

First time I can solve a graph problem (1829F - Forever Winter) ^_^

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

Is it legal for two or more people to participate using the same account?

I think this account c0nf11c7 is being used by two or more people in this contest.

Here are the clues that lead me to believe this:

  1. Some of the code has strange symbols, while other code does not.
    This is unusual, as we usually use the same template during the contest.

  2. There is only an 11-second gap between problem C and H, and the templates of them are different.
    C: https://codeforces.com/contest/1829/submission/204766645
    H: https://codeforces.com/contest/1829/submission/204767094

If this is indeed cheating, please take action as soon as possible.

MikeMirzayanov should look for this.

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

Best Contest of my life

Thank you all

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

if i hack some people i'll gain extra elo ?

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

Hello, CF why I it give me TLE here 204890621 I replace if (n%3!=0) by if(n/3*2!=n-n/3)

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

    you are resetting your dp array everytime which made it $$$O(1e7 * t)$$$.
    Try using map to memoize.

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

      Thank you, but why it did not give TLE on test 1 And my friend do the same thing but vector v(max(n, m), 0) but he get accepted

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

        why it did not give TLE on test 1

        The code only TLE's if there are too many test cases. Test 1 has only 11 test cases and resetting the array 11 times is fast enough. Resetting it 1000 times is not fast enough.

        And my friend do the same thing but vector v(max(n, m), 0) but he get accepted

        That sounds like it shoudn't pass the time limit (or I'm just stupid). Can you send a link to your friend's code?

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

hello everyone, first of all I am sorry for bad English. Can someone tell me about the best place where I can reed about theories in c++?

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

Video Solution Of All Problems.

Link : https://youtu.be/axLtBF-td3o

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

Nice contest, btw in case someone is interested: This is a similar problem to C

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

a good day to be a swiftie on codeforces

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

https://codeforces.com/contest/1829/submission/204906135 https://codeforces.com/contest/1829/submission/204781971

I have viewed the hack log and wonder why some people wrote these code that looks like a backdoor.

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

When will I gain a rate?

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

    This contest was also unrated for me even though it should have been rated?

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

    The rating updates several hours after the end of the systems tests. Just wait little bit more

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

hey when will the rating get updated??

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

What happened? Did E get canceled?

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

After how much time the rating was updated

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

Failed system test on D :( My submission

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

First time, solve 6 problems, thanks and appreciate, T.T

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

This was my second contest, My rating after first contest(which was of div2) was 548. Still this round was unrated for me, why? Can anyone plz tell me, I am new to this site.

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

    same happened with me too....however this was my first on codeforces

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

    Have patience, rating will be updated soon!

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

Me when I solve A and B: :DDDDDDDDDDDDDDDDDDD

Me when I'm stuck on C: ;(((((((((((((((( ;(((((((((

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

Keep doing good work guys. We are grateful for those contest <3

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

I am a newbie with ~600 rating, then why is this contest showing to be unrated in my contest section!

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

    The ratings are not updated yet, so It is normal for the results in your contest section to appear as Unrated. Let's wait until the rating is updated!

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

As a tester, this is surprisingly not that bad for a Div. 4

https://randomgenerate.io/

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

Why am I not rated?

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

nice contest

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

Great problems! Problem F is really impressive!

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

Expected to cross newbie level with this contest, but fine, it was a great contest with interesting problems

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

Swifties round :)

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

Can anyone tell me why I got -40 even though I solved A and B ?

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

    The contest was Div.4 — it means the problems were easier, and you had to solve more problems than usual to get expected performance in the contest.

    In this contest, you got performance of 321, it's lower than your rating, so unfortunately you received a negative rating change for that.

    Better luck next time! You can install the Carrot Extension to see the predicted rating changes.

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

I think this round is good.

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

Problems in this contest are good. I enjoyed.

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

superb problems

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

I and kissan share same snippet template as we are friends and he teached me about competitive programming and question A the logic of is basic and simple and we have same logic for this question. This was unintentional and a coincidence. I request you to please remove plagiarism from this 204763906. And you can check rest submissions are unidentical. mesanu , flamestorm , SlavicG

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

Hello!

Today, just 5 minutes ago I received the following message Attention!

Your solution 204781248 for the problem 1829D significantly coincides with solutions Charizard2021/204781248, abhi.kr.2100/204797637. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.com/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

This is from the most recent Div 4 and it is problem D, and I do not know who this person is. My code is quite simple. The last line where I am printing YES or NO, is a new thing that I just learned. I have never used it before since one line printing is new to me. The other parts of the code is simple logic that is used in the editorial as well. I am unsure why I am flagged in this case, this must be a coincidence. The logic is very simple and the editorial uses the exact same idea. I wanted to make my code look concise, that's why in the recursion there is the ||. I am sure many people used the same method. None of the other submissions match with this person either. mesanu flamestorm SlavicG MikeMirzayanov

Thanks!

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

Nice probelems

»
9 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it
import sys
def input():
    return sys.stdin.readline().strip()

def solve():
    n, m  = map(int, input().split())
 
    grid = [list(map(int, input().split())) for _ in range(n)]
    neis = [[0,1],[0,-1],[1,0],[-1,0]]
    
    def dfs(i,j):
        if i<0 or i>=n or j<0 or j>=m:
            return 0
        if not grid[i][j]:
            return 0
            
        rs = grid[i][j]
        grid[i][j] = 0
        for dx, dy in neis:
            nx, ny = dx+i, dy+j
            if 0<=nx<n and 0<=ny<m and grid[nx][ny]>0:
                rs += dfs(nx,ny)
        return rs
        
    ans = 0
    for i in range(n):
        for j in range(m):
            if grid[i][j]:
                ans = max(ans, dfs(i,j))
    
    print(ans)
    
for i in range(int(input())):
    solve()

Hmm does anyone know why this fails on test case 6 for problem E? Cannot seem to figure it out. Seems quite straightforward but am I missing something?

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

I tried solving G with DP, but it is even failing on the first test case:

Spoiler

P.S: I'm sorry about the bad format of the code, I don't know how to make it look good.