Блог пользователя SlavicG

Автор SlavicG, история, 12 месяцев назад, По-английски

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!

  • Проголосовать: нравится
  • +238
  • Проголосовать: не нравится

»
12 месяцев назад, # |
  Проголосовать: нравится +39 Проголосовать: не нравится

As a tester, problems are great!

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

    • »
      »
      »
      12 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится -17 Проголосовать: не нравится
Click for positive delta
»
12 месяцев назад, # |
  Проголосовать: нравится +140 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

queue

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

excited for it

»
12 месяцев назад, # |
  Проголосовать: нравится -40 Проголосовать: не нравится

so trash contest xD

»
12 месяцев назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Ya slavicG div4 contest

»
12 месяцев назад, # |
  Проголосовать: нравится -19 Проголосовать: не нравится

in queue

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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!

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится +30 Проголосовать: не нравится

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

IMG-3731

»
12 месяцев назад, # |
  Проголосовать: нравится +37 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    for me just 48.I wish you all the best

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Good Luck for everyone I hope to be pupil

»
12 месяцев назад, # |
  Проголосовать: нравится +25 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

Praying for +14 delta

»
12 месяцев назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

thank you very much!!

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Finally div 4...

»
12 месяцев назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Thanks

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

Are you ready for it?

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I am a beginner. How difficult is Div4?

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Give a glance to the previous div.4 contests.

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

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!)

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hope everybody solve all problems!

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

As a participant, hope to reach cyan.

»
12 месяцев назад, # |
Rev. 4   Проголосовать: нравится -12 Проголосовать: не нравится

There was no queue today..thanks

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

half hrs left i'm feeling nervous :)

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится -32 Проголосовать: не нравится

Queue Forces!!!!

»
12 месяцев назад, # |
  Проголосовать: нравится +40 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

nice Taylor Swift round.

»
12 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Good contest, quit after solving 2 problems.

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

Taylor Swift Round 871!

»
12 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

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

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Nice problems. i liked G and H more

»
12 месяцев назад, # |
  Проголосовать: нравится -7 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Single people after reading problem A:

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Любительский разбор всех задач.

Задача A
Задача B
Задача C
Задача D
Задача E
Задача F
Задача G
Задача H
»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

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.
  • »
    »
    12 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

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

  • »
    »
    12 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

    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.

    • »
      »
      »
      12 месяцев назад, # ^ |
      Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

      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?

      • »
        »
        »
        »
        12 месяцев назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

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

      • »
        »
        »
        »
        12 месяцев назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Nice contest !!

»
12 месяцев назад, # |
  Проголосовать: нравится +110 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Great Contest.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 ??

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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.

    • »
      »
      »
      12 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится -9 Проголосовать: не нравится

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

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

    • »
      »
      »
      12 месяцев назад, # ^ |
        Проголосовать: нравится +4 Проголосовать: не нравится

      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.

»
12 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

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

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Did you notice the references in the announcement?

    • »
      »
      »
      12 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    how did you reach Specialist without knowing Dynamic programming?

    • »
      »
      »
      12 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can somebody explain me why this solution got TLE?

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

  • »
    »
    12 месяцев назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

I bashed E with DSU ;)

»
12 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

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....)

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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 :( (

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Finally, solved all.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hint for G. Hits Different ?

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится

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

    • »
      »
      »
      12 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      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

      • »
        »
        »
        »
        12 месяцев назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        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.

        • »
          »
          »
          »
          »
          12 месяцев назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

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

          • »
            »
            »
            »
            »
            »
            12 месяцев назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            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.

            • »
              »
              »
              »
              »
              »
              »
              12 месяцев назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              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

              • »
                »
                »
                »
                »
                »
                »
                »
                12 месяцев назад, # ^ |
                Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

                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.

        • »
          »
          »
          »
          »
          12 месяцев назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          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!!! :>

          • »
            »
            »
            »
            »
            »
            12 месяцев назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится +10 Проголосовать: не нравится

    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.

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится

    The collaboration I never knew I needed.

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

The contest was great

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

First time I can solve a graph problem (1829F - Вечная зима) ^_^

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится +20 Проголосовать: не нравится

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.

»
12 месяцев назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

Best Contest of my life

Thank you all

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

    • »
      »
      »
      12 месяцев назад, # ^ |
      Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

      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

      • »
        »
        »
        »
        12 месяцев назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        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?

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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++?

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Video Solution Of All Problems.

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

a good day to be a swiftie on codeforces

»
12 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

When will I gain a rate?

»
12 месяцев назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

hey when will the rating get updated??

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

What happened? Did E get canceled?

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

After how much time the rating was updated

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Failed system test on D :( My submission

Spoiler
»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Me when I solve A and B: :DDDDDDDDDDDDDDDDDDD

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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!

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

https://randomgenerate.io/

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why am I not rated?

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

nice contest

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Great problems! Problem F is really impressive!

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Swifties round :)

»
12 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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.

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I think this round is good.

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Problems in this contest are good. I enjoyed.

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

superb problems

»
12 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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 месяцев назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Nice probelems

»
10 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
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?

»
10 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.