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

Автор RedLycoris, история, 4 года назад, По-английски

Hello Codeforces! (你好,代码部队)

We are glad to invite you to participate in Codeforces Round 872 (Div. 1) and Codeforces Round 872 (Div. 2) on 08.05.2023 15:05 (Московское время). Please note the unusual start time.

This round is rated for all the participants. You will be given 5 problems (one of which is divided into two subtasks) and 2 hours to solve them in each division.

Assume you are YuezhengLing, and in this round, your best friend LuoTianYi will give you several problems to solve.

(LuoTianYi is the left one and YuezhengLing is the right one)

We would like to thank:

  1. RedLycoris, CrTsIr, Sunset1028, SanweiTreap and Gellyfish for writing the problems.

  2. Artyom123 for coordinating the round.

  3. MikeMirzayanov for great Codeforces and Polygon platforms.

  4. He_Ren, zhoukangyang for our red suns testing the round.

  5. Qingyu, zimpha, SeeleVollerei, Crying, rui_er, Kevin114514, Lynkcat, lgswdn, FreshP_0325, mzen for red testing the round.

  6. KbltQaQ, LHQing, Falashiro, NemanjaSo2005, geospiza, Kohaku, maoweishou, welleyth, EasonTAO, Rushroom, Gheal, rsj for orange testing the round.

  7. Error_Yuan, fishy15, Lyrically. cadmiumky, yash_0402, smokebellew for purple testing the round.

  8. LRL65, ayhan23, Zhangxuyang, Koful123, playerr17, AhmedEzzatG for blue testing the round.

  9. zhy137036 for green testing the round.

  10. tibinyte2006 for gray testing the round.

  11. You

    for participating in this round.

UPD: Scoring distribution:

Div.1: 500 – (500+750) – 1750 – 2250 – 3000

Div.2: 500 – 1000 – 1500 – (1000+1250) – 2750

UPD: Editorial is available here

UPD: Winners!

Div 2:

Div 1:

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

»
4 года назад, скрыть # |
 
Проголосовать: нравится +85 Проголосовать: не нравится

awa

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +24 Проголосовать: не нравится

hoping for easy A this time so more people can participate otherwise they will just leave :|

»
4 года назад, скрыть # |
 
Проголосовать: нравится +131 Проголосовать: не нравится

As the gray tester, I guarantee that taking last place in this round will result in negative delta.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Why there's no cyan testing?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

As a (former) purple tester, I secured last place in testing easily. Anyway, good luck in the round!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +65 Проголосовать: не нравится

As a tester, this round might be Chinese-friendly.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +23 Проголосовать: не нравится

gl hf

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Cyan's : Are we a joke to you?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

As a newbie I don't know much about how codeforces ratings work, but which of the two contests can I give and expect a change in my rating? Div1 or div2? Or will both not affect my rating?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

orz

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

unfit my schedule but still appreciate

»
4 года назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

I really like a sentence from chinese participants:啊?()

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Cute

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

What should I say.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится
»
4 года назад, скрыть # |
 
Проголосовать: нравится +40 Проголосовать: не нравится
»
4 года назад, скрыть # |
 
Проголосовать: нравится +41 Проголосовать: не нравится

wow!Nan-bei!!!!(我超 南北组!!!!)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Lot of people say there is too much math in chinese rounds. Is this true?

»
4 года назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +51 Проголосовать: не нравится

wow, LuoTianyi and YuezhengLing! what year is it today 我超!南北组!今夕是何年

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Yet another Chinese round. Time to lose ratings.

»
4 года назад, скрыть # |
 
Проголосовать: нравится -32 Проголосовать: не нравится

From the time to the theme,it's not only round by Chinese but also round for Chinese.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Too much testers. Hoping for an amazing round.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +117 Проголосовать: не нравится

Damn, div 0?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why am I here?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Please continue this great time!And I love nanbei!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Damn, div 0?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится
»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

%%%gezhiyuan %%%sanweitreap

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

As a tester, i think this round is a good one.It is friendly to beginners.Good luck to all!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

You

for participating in this round.

You

is very magical.
»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

1 up rate for cuteness ._.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Cutest invitation/announcement I have ever seen... <3

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Anime, good.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Announcement so cute, I can't miss this contest at all.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Return to orange again,hope not dropping this time...

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Extremely excited for this contest. Hoping for a positive delta

»
4 года назад, скрыть # |
 
Проголосовать: нравится +30 Проголосовать: не нравится

As a tester, this round has beautiful problems, really loved solving them. Good luck!

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Points distribution?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

W*c, Vocaloid!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Wish rp++

»
4 года назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

As a tester, I tested.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

no way,is it 2023 ? last time i saw them was almost 5 years ago, rating++pls (今夕是何年)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

wawawawawa!!!!!so cute!!!!

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why unusual start time?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Friendly time for participants.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Can I become CM today?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Chinese round has math problems. Hope to solve at least one of them.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

i think that will be a great round.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

as a tester I'm not, but it's a good trick to raise a contribution ( :

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Upvote me to have +ve delta

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

All the best everyone.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

orz

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

My first Div 1 round. Hope for amazing problems)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Wow! Lyrically! btw gl!

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Good luck!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится
My copy of the picture in the announcement
»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I know that some Chinese people hold this contest. But as a Chinese middle student, I don't think it's a good time to start the contest. Chinese students especially high school students have nearly no time to participate the contest on Mondays. I'm just in Grade 7 but I have too much homework to do. I usually finish my homework after 10:30 p.m.

»
4 года назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

wtf, div1B have mathematical expectation.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Speedforces A,B

»
4 года назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +42 Проголосовать: не нравится

I'll never write div1 again!.. until I can solve d1C-D. div2 on my second account is way better than two hours of complete hell and a decent rating loss, which is what happens 99% of the time

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Thank you for this contest. (Praying that I don't fail systests)

»
4 года назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Why does div2C have such a weird test case?

6 6
-1 1 4 5 -1 4

WTF!!!

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to optimize in D1B2

»
4 года назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

Wow, today I experienced the feeling of submitting a solution last minute. Nothing can beat this feeling.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Wrong Answer on Pretest 6.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Amazing problems D1,D2 (B1, B2). Thanks a lot :)

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

    I solved D1, for odd n answer is 1, how to solve D2,i know what to do but can't optimize it.

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

      Each edge of A- B counts as a sum of exactly C(down[B],k) * C(n — down[B], k), here down[X] is how many vertices lie in subtree X if hanging on vertex 1. (Here I consider that B is strictly deeper than A). Actually, in my solution of D1 I could have changed only 2-3 lines to get D2, but I noticed this only later. С(n,k) — binomial coef.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

In problem $$$B2$$$. Let's calculate for every vertice number of good combinations for it, and then sum them. Look at vertice $$$v$$$. Let $$$a_1, \dots, a_p$$$ be sizes of its subtrees. The combination is good if and only if there is no subtree with more than $$$\frac{k}{2}$$$ vertices in combination. So if $$$v$$$ is not in the combination (if it is, there is a little change) the answer is:

$$$\sum_{0 \le b_i \le min(a_i, \frac{k}{2}), \sum{b_i}=k} {k \choose b_1, \dots, b_p}$$$

How to calculate it?

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

    Consider the set of good vertices for fixed locations of the $$$k$$$ nodes. This set of good islands is always connected and, if there are $$$m$$$ good islands, between them there are $$$m-1$$$ edges. Try to calculate the expected number of edges between the good nodes instead of the expected number of the nodes. Or more specifically, try to calculate how many times each edge will be between two good nodes. The answer will be this plus 1.

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

    Let's find the number of bad combinations with vertex $$$v$$$. Notice, that there should exists only 1 subtree with number of vertices from combination greater than $$$\frac{k}{2}$$$. So let's fix that subtree. Suppose size of this subtree is $$$s$$$. Then the number of bad combinations is $$$\sum_{i=1}^{k} \binom{s}{k+i} \binom{n-s}{k-i}$$$. We fix the number of vertices from combination in that subtree: $$$k+i$$$. Then choose them with $$$\binom{s}{k+i}$$$ ways. And multiply it with $$$\binom{n-s}{k-i}$$$ — number of ways to place other $$$k-i$$$ vertices not in that subtree. We need to calculate this sum for $$$O(n)$$$ sizes. You can rewrite this sum as $$$\sum_{i=k+1}^{s} \binom{i-1}{k} \binom{n-i}{k-1}$$$. Why? Consider the binary array with size $$$n$$$ and $$$k$$$ ones. Then this sum is the number of way to have $$$ \gt \frac{k}{2}$$$ ones in the first $$$s$$$ positions. Let's fix the position of $$$k+1$$$ ones — call it $$$i$$$. Then we need to have $$$k$$$ ones on the left and $$$k-1$$$ on the right. Number of ways to choose left ones is $$$\binom{i-1}{k}$$$, on the right is $$$\binom{n-i}{k-1}$$$. The binomial coefficients do not depend on $$$s$$$, so you can calculate it fast with prefix sums.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Honestlly, I felt like div2. Problem D1 was like regular D problem. It's points should have been more at least 1750. Definitely NOT 1000 points problem.

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

    How? That's way easier than regular D's. It's just counting total number of paths in a tree, and it's a very standard problem.

    • »
      »
      »
      4 года назад, скрыть # ^ |
      ← Rev. 3  
      Проголосовать: нравится -14 Проголосовать: не нравится

      For K = 2 , it would have been WAY EASIER THAN REGULAR D.

      but when u add K = 3, things become little complex. You have to add prefix Sum DP.

      suppose all the neighbours of node are having subtree of size a1,a2,a3,a4,a5...

      now, we need to find pattern of prefix sum DP where

      int total = 0;
      for(int i = 0 ; i < a.size() ; i++) {
        for(int j = i+1 ; j < a.size() ; j++) {
            for(int k = j+1, j < a.size() ; k++) {
                   total += (a[i] * a[j] * a[k] % MOD);
                   total %= MOD;
            }
        }
      }
      

      Converting these three for loops into LINEAR TIME was definitely challenging for me, I don't know about others.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

D is a standard problem that consists of two phases:

  1. add $$$k$$$ for rectangle area ($$$O(N)$$$ times)

  2. after all addition, calculate the sum for rectangle area ($$$O(N)$$$ times)

I know it is can be done in $$$O(N \log N)$$$ by Binary Indexed Tree, but I did not want to think it deeply and wrote lazy propagation code with same time complexity which is TLE due to big constraints ... Is it intended?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I don't know, whether div2.C was tricky or i am dumb :)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

SpecialCaseForces

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I like the tasks, although I'm not able to solve B2/C even after thinking a lot

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Isn't B1 answer just 1 if k = 1 or k = 3 and if k = 2 answer is sum of lenghts of all paths? (by lenght I mean number of verticies)

»
4 года назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

How to solve d1C? It's the hardest d1C I've seen in real contest.

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится -8 Проголосовать: не нравится

    For C, I try this: Every non-leaf node which does not have more than 1 child can be compressed into it's descendant. I think if we do this we might be able to pass with dp[node][val], which gives minimum moves to make all leaves in subtree of node equal to val. Because height of tree after compressing is logarithmic. Idk if it will work I fail to implement in time

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

    hi, so the idea i got (and did not have time to implement in contest)

    let dp[u][x] = min number of moves to get x as common xor among all paths from leaves upto u

    then dp[u][x ^ a[i]] = min(dp[u][y] + 1, sum(min(dp[v][x], dp[v][z] + 1)))

    You notice that all the dp values are atmost 1 off from each other, so you store min and the values of the state which achieve this min. Then you can do subtree merging.

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

    Do dfs to solve subtrees.

    When solving a subtree, basically you have the children subtrees that might be solved using OPTIMAL number of changes to some values and OPTIMAL+1 to the rest.

    Merge that by looking at which values appear as optimal the most in the children subtrees.

    Optimize the solution by using small to large merging.

    It's a pretty standard idea tbh.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +42 Проголосовать: не нравится

Even I got $$$\Delta \approx -70$$$, B2 is an overwhelming problem. This time I was completely defeated. Thank you for good contest!

»
4 года назад, скрыть # |
 
Проголосовать: нравится -7 Проголосовать: не нравится

I might've finally reached expert!

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I am expecting to become a Master excitedly!

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone Please explain the solution for Div 2 C / Div 1 A . . .

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

    Suppose u 1st sitted the person at xi whose xi was greater than 0 then choose this as pivot point and make other people sit accordingly like persons with -1 will sit left to it and persons with -2 will sit right to it while persons with xi>0 are independent to sit at xi.

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

    We have 3 cases to consider:

    1. start at seat 1, then our answer will be number of option 2s + number of distinct option 3s
    2. start at seat m, then our answer will be number of option 1s + number of distinct option 3s.
    3. We start at a seat x that is not 1 or m. In this case, we must fill up the "gaps" to the left and right of the seat x that we start at.

    For the first 2 cases, we see that if we start at 1 we can never pick the left guys, same for if we start at m we can never pick the right guys

    Now we just need to iterate over all possible middle values x, and fill up the guys to the left of x, and the right of x. We take the number of middle values < x and the number of option 1s, and number of middle values > x and number of option 2s

    This can be done by sorting our array of middle values and doing some index checking.

    https://codeforces.me/contest/1825/submission/205103435

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

that n==k case in B2 gave me a mini heart attack for my B1. relief when I understood that it gets handled automatically XD

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Brainless D with only 7s TL

What a trash experience

  • »
    »
    4 года назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +10 Проголосовать: не нравится

    I feel your pain

    Spoiler

    Bro tried everything 😭

»
4 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

oof.

»
4 года назад, скрыть # |
 
Проголосовать: нравится -33 Проголосовать: не нравится

Div2 D testcase == 'heng heng heng aaaaaaaaaa'

^ ^

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Nice Problems

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Chinese culture export

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Strong pretests, but the successful hacking rate out of all valid attempts is 100%! Fascinating.

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Nice Contest, especially on div2 d1, d2! Btw, I was so unlucky to get in top 100 because of modular mistake on d2 :(

»
4 года назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Amazing problem Div1B (Div2D). I was struggling for "points" idea, that is, try to find number of configurations that can split two group of points and assign k//2 to each of them, and get stuck on it until the end of the contest (for almost 90 minutes). When system testing, a word "edges" came into my mind, and I only need to change two lines in my code to get accepted.

Gosh!It's so close to get a positive delta in div1. Why I am doing so bad at div1?

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I managed to solve D1 but i dont have any idea how to solve D2.

How to solve D2?

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

    Check edutorial. Generally speaking, if you think of a "correct" solution (look at the edges and not the vertices) of D1, it is immediately clear how to convert it to D2:)

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve div2 B problem...

  • »
    »
    4 года назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    Put the $$$\min(a_i)$$$ on $$$(0, 0)$$$ and put the $$$\max(a_i)$$$ on $$$(0, 1)$$$ or $$$(1, 0)$$$ depending on $$$n$$$ and $$$m$$$ which is greater, and you are very close to the answer. Just be greedy. Tutorial

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

      what if the given array is .... a[] = {-1 , -2 , -3 , 10} here putting -3 on (0,0) would give me a max value of 28 but i can get a max value of 38 if i use 10 on (0,0). i guess i'm right ?

      • »
        »
        »
        »
        4 года назад, скрыть # ^ |
        ← Rev. 2  
        Проголосовать: нравится 0 Проголосовать: не нравится

        You are right, it's my fault. T_T I think it's actually about the maximum difference and the secondary maximum difference in the array, just make the difference between (0, 0) and (0, 1) and the difference between (0, 0) and (1, 0) to be those two maximum difference in an order depending on m and n which is greater. It can be proven that the pair of the secondary maximum difference contains at least one $$$max(a_i)$$$ or $$$min(a_i)$$$

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

        I didn't think so clearly about that while programming to solve the problem because it's not important to decide which number to place in (0, 0). Actually the important thing while programming is to get the secondary maximum difference

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

This contest did show me the mirror after I became too much confident upon solving 6 problems in the last div4 contest. Was only able to solve A in this one :(

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I hope I can become specialist

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

When will the rating be? Why won't these be preliminary results. Can anyone explain the distribution of points and how they will be calculated?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

round approved

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How is it possible that the guy from the first place on div2 did 3 tasks in the 9-th minute?

»
4 года назад, скрыть # |
 
Проголосовать: нравится -11 Проголосовать: не нравится

gooooood contestttttttt___akfla

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I am unable to digest this fact that, F1shHead who had a rating of 1359 and got a rank of 3984 got -1 delta, whereas I had a rating of 1338 and even got a better rank of 3556 but still got -23 delta. I don't find this appropriate. Can anyone help me figure out what am I missing!?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +36 Проголосовать: не нравится

Chinese: 很符合我对中国场的想象!

It fits my imagination of a Chinese round!

Div1 A is a great classification discussion trash question!

Div1 B is a classic counting garbage problem!

Div1 C is a large code volume classic dsu rubbish problem!

Div1 D is classic Chinese data structure with super large code volume and weak intelligence litter problem!

Div1 E is a waste problem because only one passed it!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

I love not being able to open codeforces in public without looking like a weaboo

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why is div 1 and div 2 held separately instead of 1 open?

Most of the problems are identical and for the ones that aren't either a div 1 user will do both in <= 10 mins or a div 2 user will not get that far.

Why is there 2 separate contests then instead of 1 open contest?

»
4 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

What's the issue with CF. Its opening on phone but not on pc.

»
4 года назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

I was reminiscing about Luo Tianyi's Vocaloid while solving the contest.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

I'm a little curious about why Yuki__S2008 used inline assembly to solve both problems D1 and D2. However, on the first 3 wrong answers on D1, he or she used normal C++ codes (refer to this submission). Can anyone explain a little?