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

Автор BledDest, история, 7 недель назад, перевод, По-русски

2276A - Perfect Sandwiches

Автор: fcspartakm

Разбор
Решение (BledDest)

2276B - Replace and Compress

Автор: BledDest

Разбор
Решение (BledDest)

2276C - Subarrays

Автор: fcspartakm

Разбор
Решение (BledDest)

2276D - Caveman

Автор: BledDest

Разбор
Решение (BledDest)

2276E - Good Substrings

Автор: Roms

Разбор
Решение (Roms)

2276F - Permutation Coloring Game

Автор: BledDest

Разбор
Решение (BledDest)

2276G - Elimination of Players

Автор: BledDest

Разбор
Решение (BledDest)
  • Проголосовать: нравится
  • +35
  • Проголосовать: не нравится

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

Horrendously unbalanced and speedforces round, just not it man...

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

Thanks for your fast editorial!

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

contest was so unfun

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

My solution discussion stream for ABCDE.

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

It's possible to solve F in $$$O(nk)$$$.

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

F. Case — all cycles have length k or less without dp

394617147

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

Many people solved Problem D using DFS, even though there is an easy solution

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

this was worst contest for my entire lifetime, i guarantee

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

    Yeah, you right. It is because problem c i.e. subarray could be solved by using brute force, then I think about sliding window, after I solved it by using prefix sum with frequency. For thinking process, there were many steps for solve this problem but when think that approach so that solved it easily.

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

F and D are cool. Thanks authors!

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

A somewhat dull speedforce round,while B and E are worth pondering

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

D is easier than C...

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

This was one of the best rounds in a while! Thank you!

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

can anyone explain how the B solution is working in c++

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

    Let $$$k$$$ be the maximum number of block after compress binary string $$$s$$$,then it can be prove that in one operation you can make $$$k\rightarrow k+2$$$ or $$$k\rightarrow k-2$$$,consider index $$$i$$$,there is two situation,$$$s_i$$$ same as adjacent character or not,

    If $$$s_i$$$ same as adjacent character then if you flip $$$s_i$$$ then the block will increase $$$2$$$

    If $$$s_i$$$ is not same as adjacent character there is two more specific condition,either $$$1$$$ adjacent character is not same or both,if $$$1$$$ adjacent character is not same then flip $$$s_i$$$ will not affect the result,otherwise it will decrease $$$2$$$,check the example below

    Ex:

    $$$1$$$ adjacent character not same

    $$$[0\underline{0}]1\rightarrow 0[\underline{1}1]$$$

    both adjacent character not same

    $$$[0][\underline{1}][0]\rightarrow [0\underline{0}0]$$$

    So you need to check does there exist $$$000$$$ or $$$111$$$ for $$$k+2$$$,and $$$010$$$ or $$$101$$$ for

    Unable to parse markup [type=CF_MATHJAX]

    ,and $$$k$$$ is always can be obtain by doing nothing,thus answer either $$$1$$$,$$$2$$$ or $$$3$$$
  • »
    »
    7 недель назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Consider compressing the string without changing any character, it will always be sequence of alternate 0 or 1, lets take 10101 for example, now, the comp-string will only change if we are able to remove any, one between 2 zeros (or 101) in the comp-string, to do that, in the original string, that 1 should have zeros on both sides, which is substr = "010", given in editorial. Plus there is one more case where you can increase the size of comp-string, you can think about it in the same manner.

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

my solution to D if any node has degree 0 answer is 0 if their is any cycle answer is MANY if the graph is a star graph answer is 2 else answer is MANY

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

Hello. I don't understand how the ans is created, what is the point of dd array?

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

    dd array is used to keep track of the arithmethic progression's difference when counting the good substring. for example, if you want to make an addition to range [l, r], that means adding n-l, n-l-1, n-l-2, ... to l, l+1, l+2, ... respectively, each with difference of -1. the sol keeps the difference in dd and tracks the total difference from 0 to i (0 <= i < n) with add when computing answer for each index

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

In problem F, I feel that if the problem setter wanted an O(poly(k)) solution, they should have set k to 200. Otherwise, we can just DFS Alice's first move combined with an O(n) check and still get accepted, without even having to think about knapsack or any graceful DP.

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

Why is it named "Educational Round"? What's educational about it? Setting a problem E that easy or D brute-force cakewalk makes no sense.

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

F is really edu because of learning game dp.

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

I solved $$$E$$$ by binary search

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

HI heres and alternate soln to a. ik its a fairly simple one, but maybe u guys can tell me better ways to think. i cudnt quickly make out what wud a-b imply.

395201343

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

A question about Problem C: Why does the two-pointer technique (which somewhat resembles a sliding window of size k+1) correctly count all the answers?

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

Monocarp, when HL3???

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

Why is G rated 2100? Is it that easy?

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

G only 2100??? its clist rating reached to 3200......

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

E is really nice!! Taught me something new.

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

Why is G rated *2100? The more I work on it, the weirder it feels.

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

We can solve E in O(n), because each query can be processed in offline mode.

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

Why G is *2100 ??? It's quite difficult.