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

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

Happy Holidays!

On Dec/24/2021 17:35 (Moscow time) we will host Codeforces Global Round 18.

It is the sixth round of a 2021 series of Codeforces Global Rounds. The rounds are open and rated for everybody.

The presents for this round:

  • 30 best participants get a t-shirt.
  • 20 t-shirts are randomly distributed among those with ranks between 31 and 500, inclusive.

The presents for the 6-round series in 2021:

  • In each round top-100 participants get points according to the table.
  • The final result for each participant is equal to the sum of points he gets in the four rounds he placed the highest.
  • The best 20 participants over all series get sweatshirts and place certificates.

Thanks to XTX, which in 2021 supported the global rounds initiative!

The problems were written and prepared by the hard-working elves Monogon, BledDest, and PurpleCrayon.

We would like to thank the everyone who made this round possible:

You will have 2.5 hours to solve 8 problems.

UPD: The scoring distribution: 250 — 1000 — 1750 — 2250 — 2750 — 3000 — 3750 — 4000

UPD: Editorial is out!

Good luck, have fun, and stay off the naughty list!

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

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

As a non-tester, I am surprised the testers have not asked for contribution yet!

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

For many of us it will be the first time being called nice.

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

What was anton's role in this round?



😱

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

As a red-nosed reindeer (aka clown), I wish everyone Merry CF Xmas :)

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

This round will be good beacuse it has the best tester (TadijaSebez).

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

My 1-gon contest history

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

Hi PC

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

PurpleCrayon orz

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

The best Christmas present ever!!!

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

Merry Chrismas.

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

PurpleCrayon orz!

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

This will gonna be my first contest prepared by Monogon

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

Good luck to everyone :)

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

23 hours ago: The score distribution will be announced shortly.

Looks like it meant shortly before the round, nice

Edit: It's there now and is interesting.

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

So excited to participate in this round, wish everyone good luck)

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

Do I participate in the contest, or go spend the Christmas Eve with my family? Help

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

Great! The score distribution announced very early!

16 hour before the contest.

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

XD

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

As a person on the naughty list, will it be rated for me?

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

250 —> 1000 —> 1750 ? 750 points gap? Kinda weird O_o.

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

Hope to solve D……Dont even think about E

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

So do this kind of contests have hacking battle? Is it rated?

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

seeing scoring distribution solving C can give a +ve dleta.

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

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

Want to look insightful and smart under contest announcement? Write something like "hmm, based on the scoring distribution [insert specific prediction that couldn't possibly follow from something as vague as a scoring distribution]".

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

250 act as a bait.....

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

I hope I will become again master before Christmas!

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

May Santa bring positive delta to you all !

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

Whenever I try to submit my answer it says I need to register for the contest, but I can't find where or how to do so, can anyone tell me what to do?

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

Code through X-Mas? I just wanna say Merry Christmas and have a good rank!

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

The color rating of some of the users has changed : for example 1-gon, PurpleCrayon and other persons. Am I only the one to see that ?

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

I'm too dumb to solve quality problems like these

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

Nice problems!!! I hope pretests are strong.

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

Bit-forces

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

Bitforces round btw Merry Christmas to everyone. .

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

Others: change the color by Christmas magic :)

Me: color changed by Codeforces Global Round 18 :(

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

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

Binaryforces

»
4 года назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится
Meme(Hindi)
»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Why my E does not work?

First, red wants to minimize blues nodes. So first color K leafs since that maximizes the number of subtrees blue cannot color.

DFS for the size of the subtree of each vertex. Then DFS the tree sorted by uncovered subtree size, down to K leafs. This creates the max possible not-blue coverage. Blue gets all uncovered tree nodes. Then add more red chips "up" in the tree. This creates more red nodes. That should allways be possible, so if all leafs are covered, then R has k nodes and B has none.

Note that red gets allways exactly K vertex (if it wants it).

How to optimze w*(r-b)? If r-b is positive, R wants to maximize w, else R wants to minimize w. By minimizing b R has used some r vertex, so w=n-b-r Now if R adds another one vertex, w gets one smaller, but r-b one bigger. So this optimizes until r-b==w.

Else if r-b is negative R cannot do anything about it, since it cannot color more vertex than K, and has minimzed b anyway.

Can it be better to give blue some leaf to maximize w? -> No. If R gives away a vertex, it gets colored blue, so w does not change.

140497882

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

Some user hande color not showing correctly. some specialist have legendary grand master color, and otherway around Chrismast intentional bug?

see - ichigo_kurosaki_1226 - Monogon

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

I LOVE PROBLEM D SO MUCH SUCH A BEAUTIFUL CONSTRUCTIVE PROOF!!!

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

1.5 hours: giving contest

Remaining 1 hour: looking at standings and stalking people.

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

Here is some feedback:

A: Nice easy problem.

B: Very standard easy problem.

C: Wonderful not-so-easy problem. I was lucky and solved it fast, but I can see myself getting stuck on this one with high probability. The observation that "two moves" = "swap a 0 and a 1" was unexpected.

D: Boring standard problem. Using integer weights instead of $$$0$$$, $$$1$$$ is nonsensical. The only point that I see is that with $$$0$$$,$$$1$$$ weights the problem becomes even more standard, but using generic weights makes it only uglier, not less standard. Also the format of the output was unnecessarily complicated (why asking to print also the extreme points of the edges?).

E: The statement is nice, the solution also. I used the fact that $$$f(h) =$$$max number of blue nodes if there are at most h red nodes is a concave function, then standard methods (Minkowski sum and small-child trick) are sufficient to solve the problem. Given the amount of people who solved it, I might have overcomplicated it.

F: Nice clean dp problem.

Overall it was a nice contest, thanks to the authors.

p.s. While trying to hack someone (unsuccesfully) I found a cheater in my room.

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

H is L1 isotonic regression in partial order. You can check SRM 720 discussion for two possible solution strategy (divide and conquer, LP duality). Both will work in O(mn log n).

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

Great contest! I love problem A,B,C,D,E !!! I can't solve E but I completely love it!!

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

can anyone explain what is the solution for problem C i got stuck at c during whole contest.

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

Great contest! Merry Christmas to everyone.

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

Was E some hld-esque kind of construction where you want to break it up into maximal chains? If so, by what metric do you define heavy and light paths, since size and max depth didnt seem to work for me.

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

Codeforces Bitwise Round 18

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

Solved A, B and C after 44 mins

Then sitted for nearly 2 hrs unable to solve D.

Felt so tired at midnight.

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

In G, the reduction to general matching is easy, but it is extremely obnoxious to produce the string from the results. Why did you require outputting the string, not the maximum number of values??

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

    I don’t agree about your ‘extremely’. Whereas I agree with you that it does not have much sense, it didn't take more than 5 minutes for me

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

      Did you have $$$N$$$ vertices or $$$600$$$? Apparently $$$N$$$ vertices also passes, and then you easily get the construction. I was doing max general matching in a graph of 600 vertices, and to get to that point had to do some reductions, all of which you'd have to undo.

      If requiring to output the construction penalises you for not reducing to the smaller graph, the problem is even dumber than I thought.

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

When you're so clown you submit BFS to problem C :D

https://mirror.codeforces.com/contest/1615/submission/140484891

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

Pretty hard even for a LGM

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

that C was scary bruh

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

G is an easy exercise of max-matching with tedious implementation. I tried hard to reduce the number of vertices of the graph to 600, but it seems like $$$O(N)$$$ vertices is just OK.

H is a blatant application of the minimum cost circulation problem. I suppose it's not an intended solution, but you should have tried to kill such solutions.

I believe these two should not be the hardest tasks in GCR's.

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

Hi guys! In tutorial sayd that B can be solved in range (1<=l<r<=1e9). But I think I solved this problem for this diapozone. Can anyone check my submission and tell me if this is indeed the case This is my submission](https://mirror.codeforces.com/contest/1615/submission/140492198) Thank you

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

Mary Christmas everyone. Now don't think about the problems you couldn't did, go and enjoy.

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

Santa is making too many LGMs this night.

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

The round's Problem C,D to me:
*A few shots*
Merry Christmas, you filthy animal, and a Happy New Year.
*Another shot*

I think that the solution to E is much more obvious than CD(
But personally I think the round is pretty okay.

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

G: I like the idea of this problem, reduction to general matching & to reduce # of vertices into 600. But the implementation amount of 2 solutions(O(600) vertices / O(N) vertices) is quite different, and my solution just use (practically fast) O(EV log V) matching with O(N) vertices. Personally I wish N <= 600 or print only the answer instead of array construction.

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

Waiting for SecondThread's screencast to see his reaction on losing red :p

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

rated?

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

Unofficial T-shirt winners list

Important: The winners list has been updated due to changes in the scoreboard.

Since the official announcement isn't here yet and I'm an impatient person, I've decided to find out who won the t-shirts for myself. (again...)

As always, you can do the following steps to get the t-shirts winners of Global Rounds:

1) Download testlib.h from Mike's github repo.

2) Use it to compile randgen.cpp :

randgen.cpp

3) Run the Python script winners.py, replacing the number in contest = [] with the ID of the contest in question (in this case, 1615):

winners.py

Both of these scripts are taken from the official winners announcements in previous Global Rounds, but if you have any doubts on their legitimacy you can always check these results against the official ones later.

With that out of the way, congratulations to the (unofficial) t-shirt winners:

List place Contest Rank Name
1 1615 1 dengyaotriangle
2 1615 2 yosupo
3 1615 3 heuristica
4 1615 4 QuietBeautifulThoughts
5 1615 5 inaFSTream
6 1615 6 maroonrk
7 1615 7 SSRS_
8 1615 8 tourist
9 1615 9 hos.lyric
10 1615 10 HIR180
11 1615 11 Radewoosh
12 1615 12 LorentzianExpanders
13 1615 13 ksun48
14 1615 14 qazswedx2
15 1615 15 Benq
16 1615 16 Konijntje
17 1615 17 zh0ukangyang
18 1615 18 ugly2333
19 1615 19 Karry5307_AK_NOI2026
20 1615 20 risujiroh
21 1615 21 Froggay
22 1615 22 tatyam
23 1615 23 Alan233
24 1615 24 Rinne_qwq
25 1615 25 wasa855
26 1615 26 TLE
27 1615 27 PetelgeuseRomaneeconti
28 1615 28 Golovanov399
29 1615 29 dorijanlendvaj
30 1615 30 Y25t
45 1615 45 lumibons
132 1615 132 AlenAbeshov
161 1615 161 Shameimaru_Aya
199 1615 199 kizen
224 1615 224 Swadia
246 1615 246 ChenKaifeng
268 1615 268 RoundRoundUP
295 1615 295 retah
334 1615 334 Acranker
342 1615 342 Neal_lee
365 1615 365 Forza_Ferrari
381 1615 380 Bakry
392 1615 391 Xellos
400 1615 400 HeartBreakKid
401 1615 401 loan
403 1615 403 TsukikoTsutsukakushi
434 1615 434 popescuadrian
437 1615 435 SampsonYW
439 1615 439 FelixMP
489 1615 489 nanatoday
»
4 года назад, скрыть # |
 
Проголосовать: нравится +46 Проголосовать: не нравится

I wonder that when will the rating change, I can't wait!

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

why rating is not updated yet?

»
4 года назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится
Hindi meme (English: where is my rating)
»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +34 Проголосовать: не нравится

In this contest, H is a template isotonic regression task. I copy the code in this editorial for another task which was posted on 2020-06-22. It could passed with changing the cost value and deleting the liner-base part. I think that it's OK according to the rule.

upd: KAAM also said that H is well-known and his/her code also marked the solution.

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

Hello, Can someone please help me in finding out why my solution TLEs for C? As far as I can tell the time complexity should be O(n) and I can't seem to figure out how to speed things up, or maybe I'm missing something? Thanks https://mirror.codeforces.com/contest/1615/submission/140578120

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

Today I recieved a mail from codeforces, that my code is similar to few people from my latest contest solution submission (Global Round 18). PurpleCrayon please go through from my submission once 140506276 its just a simple if-else or nothing that's why I think my submission is similar to others. If you can do something it's great for me.

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

can I get the T-shirt?qwq

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

Congratulations to tshirts winners! In a few weeks you will be contacted via private messages with instructions to receive your prize.

As usual, we used the following two scripts for generating random winners, seed is the score of the winner.

get_tshirts.py
randgen.cpp
List place Contest Rank Name
1 1615 1 dengyaotriangle
2 1615 2 yosupo
3 1615 3 heuristica
4 1615 4 QuietBeautifulThoughts
5 1615 5 inaFSTream
6 1615 6 maroonrk
7 1615 7 SSRS_
8 1615 8 tourist
9 1615 9 hos.lyric
10 1615 10 HIR180
11 1615 11 Radewoosh
12 1615 12 LorentzianExpanders
13 1615 13 ksun48
14 1615 14 qazswedx2
15 1615 15 Benq
16 1615 16 Konijntje
17 1615 17 zh0ukangyang
18 1615 18 ugly2333
19 1615 19 Karry5307_AK_NOI2026
20 1615 20 risujiroh
21 1615 21 Froggay
22 1615 22 tatyam
23 1615 23 Alan233
24 1615 24 Rinne_qwq
25 1615 25 wasa855
26 1615 26 TLE
27 1615 27 PetelgeuseRomaneeconti
28 1615 28 Golovanov399
29 1615 29 dorijanlendvaj
30 1615 30 Y25t
45 1615 45 lumibons
132 1615 132 AlenAbeshov
161 1615 161 Shameimaru_Aya
199 1615 199 kizen
224 1615 224 Swadia
246 1615 246 ChenKaifeng
268 1615 268 RoundRoundUP
295 1615 295 retah
334 1615 334 Acranker
342 1615 342 Neal_lee
365 1615 365 Forza_Ferrari
381 1615 380 Bakry
392 1615 391 Xellos
400 1615 400 HeartBreakKid
401 1615 401 loan
403 1615 403 TsukikoTsutsukakushi
434 1615 434 popescuadrian
437 1615 435 SampsonYW
439 1615 439 FelixMP
489 1615 489 nanatoday