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

Автор cry, 2 года назад, По-английски

Hello Codeforcers!

We are pleased to invite you to participate in CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!). This round will start on 30.03.2024 17:35 (Московское время) and will be rated for all participants. There will be $$$8$$$ problems to be solved in $$$3$$$ hours, with one divided into two subtasks. Similar to USACO, you will help Farmer John and his cows resolve a series of first world problems. Be there or be square.

This round was cooked up by smax, sum, oursaco, cry, and buffering.

We would like to thank the following people for making the round possible:

Score Distribution:

$$$500 - 1000 - (1250 + 750) - 2250 - 2500 - 3000 - 3000 - 4500$$$

Editorial

Congratulations to our Winners and First Solves!

Top 5:

  1. maroonrk

  2. Radewoosh

  3. ecnerwala

  4. cnnfls_csy

  5. zhoukangyang

First Solves:

A. A_G
B. jiangly
C1. ksun48
C2. turmax
D. Omer223
E. tourist
F. Radewoosh
G. tourist
H. ecnerwala

And here is the information from our title sponsor:

Hello, Codeforces!

We, the TON Foundation team, are pleased to support CodeTON Round 8.

The Open Network (TON) is a fully decentralized layer-1 blockchain designed to onboard billions of users to Web3.

Since July 2022, we have been supporting Codeforces as a title sponsor. This round is another way for us to contribute to the development of the community.

The winners of CodeTON Round 8 will receive valuable prizes.

The first 1,023 participants will receive prizes in TON cryptocurrency:

  • 1st place: 1,024 TON
  • 2–3 places: 512 TON each
  • 4–7 places: 256 TON each
  • 8–15 places: 128 TON each
  • 512–1,023 places: 2 TON each

We wish you good luck at CodeTON Round 8 and hope you enjoy the contest!

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

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

As a tester I really enjoyed the round and I highly recommend everyone to participate in it!

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

As a tester, this round will happen at a really funny time!

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

As a tester I really liked the problems, I recommend you to participate!

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

What can 1 TON buy me ?

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

Doge council decided that problems are great and you should participate

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

As a tester, I'm sad I couldn't participate.

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

OMG! rainboy is tester!

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

As a tester, I can say that this round is GOATed!

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

As a monkey tester, the cows are friendly :)

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

As a tester, smax orz

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

as a tester with photo of Stewie Griffin i say .........................................................................Brian Griffin

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

smax orz

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

As a tester, I enjoyed helping Farmer John with his never-ending problems.

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

As a tester, I can confirm the epicness of this contest.

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

As a tester, I have to say, excellent round, I hope everyone enjoys it thoroughly.

Having such intelligent individuals commenting on the problems is very encouraging, yet depressing at the same time.

Have a nice contest!

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

orz myvaluska the pupil tester

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

As a non-tester, I want to say that I hope the round will be cool

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

Is the score distribution right (1250-750) or it should be (1250-1750).

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

1800 plz!

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

Heh, just realized it would be ~4.5 years since my last rated contest, and I'm now kinda willing to take part in a rated one for old time's sake.

Hope that I would not get a -ve delta T.T

UPD: I screwed myself up badly T.T Still the problems were great anyway!

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

I wish codeforces had the same high quality UI design like ton.org does.

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

Good luck to everyone!

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

First time participating in a CodeTON, what is the difficulty of the problems in USACO terms?

Thank you in advance)

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

value of TON tripled since the last CodeTON round, it's $5/TON now

so the first place winner will receive a prize of $5,000. wow

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

I believe that listening to the best video game official soundtrack may help your performance during this round.

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

Thank you all for this wonderful round. I am very excited!

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

I'm glad that the prize isn't NOT coin :D

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

mike was too lazy fixing the problem ratings so he thought why not remove rainboy completely from the contest

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

WOW! Benq Geothermal and rainboy! This test will be wonderful!

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

What does (1250+750) represents in terms of points, like do we need to solve both the problems to get the points, if not why the D problem is of 750 pints ?

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

Another 1024 TON to tourist.

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

Can newbies or beginners register??? And solve problem will there degradation in rating if my problem goes wrong???

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

i hope i can get 2 ton!

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

As a tester, I almost forgot to make "as a tester" comment.

Anyway, the problems are great! Huge orz to the setters and I recommend everyone to participate in this round.

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

left after seeing polygons...

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

INTERESTING_FORCES unfortunately got so many penalties in C2

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

Very good and interesting problemset.

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

this contes could be better

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

Problem D: Learning to Paint is a straight-forward application of the famous interview problem.

I have added hints and thought process for this problem on CF Step.

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

254174144

Problem D. Can someone explain, why random gives TL?

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

is C2 constructive, casework problem?

calculate the distance, first select power of 2 to get extra, second select even until 2, then add rest? idk

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

need hints for c1 :/

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

A question about task E: "It may be the case that the game will continue indefinitely" as far as I'm concerned, that's not true, right? I couldn't find any example configuration where the game continued indefinitely

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

As a music gamer, I got defeated by the tiebreaker (looking forward to the solution). Anyway thanks for the cool round!

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

why did I notice E so late? T_T, idk how to solve D without segtree or efficiently with segtree

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

Can anyone tell why my code is giving wrong answer for question c2? https://mirror.codeforces.com/contest/1942/submission/254186598

UPD: Nvm, system tests are over

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

Problem C has definitely ruined all this competition.

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

i did bad, very bad. c1 defeated me. i don't know why i did not notice that the inner polygon is also created for 2 hours.

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

In D problem1
1- if i do dp to get maximum sum(mx_sum) and hm ways i can get this sum (freq)
2- k-=freq
3- then dose 1 again but i wanna second max so i use the mx_sum from last dp.

is this solution will pass?

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

A frustrating contest indeed !!

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

Are some of my observations for E incorrect?

  • The only thing which actually matters is the min gap between some $$$a_i$$$ and $$$b_i$$$, i.e, $$$min(b_i - a_i)$$$.

  • Any move always preserves the parity of this, meaning P1 will always win for an odd value and lose for an even value.

  • The gap between $$$b_{i - 1}$$$ and $$$a_i$$$ doesn't matter since A's movement left / B's movement right is bounded while the other's is unbounded (subject to the loss by parity above).

  • So for each odd gap upto $$$L$$$, we can count the number of ways of the min gap between an $$$a_i$$$ and $$$b_i$$$ being exactly that, the answer should be the sum of those values.

  • We can get the ways of assigning gaps so min gap between $$$a_i$$$ and $$$b_i$$$ is $$$\geq x$$$ and rest are $$$\geq 0$$$ using bars and stars, so we take (ways of $$$min\ gap \geq x$$$) — (ways of $$$min\ gap \geq x + 1$$$).

This doesn't work for the large sample, any guesses on what I might be missing? (or is it just an implementation skill issue?)

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

    I don't think that only the min gap between some $$$a_i$$$ and $$$b_i$$$ matters. If you consider the array of non-zero $$$a_i - b_i$$$, $$$\Delta$$$, then $$$\Delta = {2, 4}$$$ is a loss for the first player but $$$\Delta = {2, 3}$$$ is a win. The minimum value is the same, but the result differs.

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

      Edit: I'm a dumbass, I misread the problem and though the farmer had to move ALL of their cows left / right in a given move...

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

        Holy cow, I also misread the problem and "solved" it in the exact same way you did lol

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

        I think proving it as a win by showing the interaction is hard since there are so many states. This kind of explains the solution so I'll put it in a spoiler:

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

    The only thing that matters is that the gap between some $$$a_i$$$ and $$$b_i$$$ should be odd.

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

Any reason for such tight constraints in D, isn't brute force O(n^2klogk)

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

Not gonna give any div1+div2 round onwards. Only div2 seems to be the way.

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

Great contest. Loved the problems! 💯
Fixed my bug on problem D only to see the "contest over" message flash right before I could submit. 🤧
Well, that's also a fun experience once in a while. The mistakes stick harder! 😂
Expert, here I come! 🤓

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

not able to solve prob D since last 3 rounds. Disappointment as always

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

Could you please pose H in a data structure training contest... (or at least have a subtask?) From $$$O(NQ)$$$ to $$$\widetilde{O}(N+Q)$$$ is apparent (if you have prepared) and boring.

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

    imo it is impossible to solve this without a dynamic dp template and there are too many details in implementing. feels like this round does not have a real extremely hard problem.

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

.

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

Is there any $$$O(nk)$$$ solution for D?

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

E

I misread it as selecting the kth cow and moving it (which is also a common situation, I think), and wasted an infinite amount of time. It would have been better if you had written it like a subset.

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

Can someone please explain how my $$$O(n^2log(k)log(nA))$$$ solution passes in D?

Submission

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

Thanks for the contest, I liked ABCEF, all are high-quality interesting problems. But I dont understand why problems like D still being accepted for Div1s in 2024, isn't it just very standard problem?

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

just realize number of participant too low compare to regular round, why is this the case?

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

Thanks for the contest!

For problem E, the case of $$$n = 1$$$ previously appeared in AGC 020 A which I wrote — not a big deal of course, but it helped me to come up with the solution a little bit faster.

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

Hello folks,

Do you know that JavaScript V8 4.8.0 was released in 2015? And included in node since 2016. That's over 8 years ago. Unlike most programming languages, JavaScript has evolved significantly since then. Latest available V8 version is 12.5.0 (Mar 18, 2024).

I'm well aware that JS is not usually used for competitive programming. But using obsolete language version is a guarantee that it will stay this way.

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

Cool round, had fun. Congrats to the setters

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

Read E for the first time and solved it in 20 mins, bruhhhhhhhhh

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

Cool round , although it was strange to have a C like this

Anyway , does anybody has 7 rating points to donate to me :(

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

It seems that G is a little too easy for the position? I personally consider F more difficult than G.

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

Why has TON skyrocketed so dramatically?

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

Can anyone help me with Golang

https://mirror.codeforces.com/contest/1942/submission/254314439

For this problem, in test 6 with n=200000, TIME_LIMIT_EXCEEDED even if I only debug and read & print the input

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

MathForces

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

I think there are too many math-like problems.

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

How to exchange TON into dollars?thanks!

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

Ummm, So how can I recieve the TON? I only realised that I can put a wallet in setting after the contest :))

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

i got a message from system saying that my solution coincides with some other solution for C2 1942C2 - Bessie's Birthday Cake (Hard Version) i think this is a coincidence an exactly similar question with the same logic was asked in one of the regional math olympiad i gave in fact for this particular question i gave three wrong submission before it was finally accepted and those submissions also used the same logic you can check that. System testing has skipped my submission can someone please help MikeMirzayanov priyanshu.p. Around 60 other people have a similar solution so it can be a common solution.

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

Exptecing a positive increase in rating

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

Hi may I ask if prizes have been given out? I havent received anything, thank you!

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

Just received a notification about filling the wallet address. But my TON keeper says that there are two address formats, starting with E and starting with U.

Which one should I write in my profile?

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

I won two TON coins in CodeTON Round 8, but now I don't know how I can receive them. I have a TON account

and also I updated my wallet before April 16 UTC.

What can I do beside just waiting?

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

I'm still not received the Ton Coin, have anyone received it ?

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

Hey, the TON coins has not been delivered yet. Is there any update about why that happened?

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

Worst C1 I have ever seen in my entire life. Please delete this problem. Thanks!