### vaaven's blog

By vaaven, 2 weeks ago, translation,

## 1802A - Likes

Idea: Aleks5d, Preparation: vaaven

Solution
Code

## 1802B - Settlement of Guinea Pigs

Idea and preparation: Aleks5d

Solution
Code

## 1801A - The Very Beautiful Blanket

Idea and preparation: 4qqqq

Solution
Code

Idea: Tikhon228, Preparation: DishonoredRighteous

Solution
Code

## 1801C - Music Festival

Idea: vaaven, Preparation: ViktorSM

Solution
Code

## 1801D - The way home

Idea: Tikhon228, Preparation: Ormlis

Solution
Code

## 1801E - Gasoline prices

Idea and preparation: Kirill22

Solution
Code

## 1801F - Another n-dimensional chocolate bar

Idea and preparation: Tikhon228

Solution
Code

## 1801G - A task for substrings

Idea and preparation: grphil

Solution
Code

• +135

 » 2 weeks ago, # |   +25 Testcases aside, I thought this was generally a really cool round (or at least all the problems I tried).
•  » » 2 weeks ago, # ^ |   +1 same
 » 2 weeks ago, # |   +14 What does SNM mean in tutorial of d1E?
•  » » 2 weeks ago, # ^ |   +18 It's DSU, fixed now
 » 2 weeks ago, # |   +8 It can be shown that it is optimal to minimize the number of shows first, and then maximize the amount of money.Can anyone share a proof of this statement? it seems intuitive but i failed to prove it:c
•  » » 2 weeks ago, # ^ |   0 If there are fewer shows, they can do another show to get more money
•  » » 2 weeks ago, # ^ | ← Rev. 7 →   +13 It can be seen that for all paths with end vertex $v$ and best vertex $t$, the number of shows is $0$ and/or the amount of money $< w_t$. So comparing any two possible paths with the same $v, t$, you can always do more shows on the path with fewer shows to get at least $w_t$ rubles, which would be more money than the other path.
 » 2 weeks ago, # |   +40
•  » » 2 weeks ago, # ^ |   +9 Never thought 69 would hurt so much
 » 2 weeks ago, # |   +1 This round is a little difficult, but the tasks are really interesting. I love div 2C.
 » 13 days ago, # |   +26 div1E smart solution is great!
 » 12 days ago, # |   0 Can I solve solve Div1 B with ternary search? If so, why my solution 197805657 did'nt work for this? Can someone help me?
•  » » 3 days ago, # ^ |   0 Hi I tried the problem with binary search got stuck WA on test 2. Have you found why this approach doesn't work? Or provide case when it fails?
 » 11 days ago, # |   0 alternate construction for beautiful blanket: for each row, simply use consecutive integers. denote the smallest power of 2 greater than m as 2^j. then let the first element in each row i be i*2^j, and the rest of the elements be simply the consecutive integers after i*2^j. this construction satisfies the conditions in the problem. examples: n=4, m=4 0 1 2 3 8 9 10 11 16 17 18 19 24 25 26 27 n=5, m=7 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 
•  » » 11 days ago, # ^ |   0 Thanks ! Your solution is easier to prove its accuracy.
 » 10 days ago, # |   -8 Why I changed N to 256,I got AC?WA CodeAC Code
 » 10 days ago, # |   0 can any one say whats wrong with this solution for div2.c 0 1 4 5 8 2 3 6 7 10 12 13 16 17 20 14 15 18 19 22 24 25 28 29 32 
 » 10 days ago, # |   -8 为什么没有中文版？Why is there no Chinese version?
•  » » 10 days ago, # ^ |   0 I think it is necessary,too.
•  » » 10 days ago, # ^ |   0 可能是他们不会写中文
•  » » » 27 hours ago, # ^ |   0 有道理
 » 7 days ago, # |   0 Can someone please explain the logic behind this part of the code in question A. Im not getting how we are printing the min string.  for (int i = 1; i <= n; ++i) { if (i <= dislikes * 2) cout << i % 2 << ' '; else cout << (i - dislikes * 2) << ' '; } cout << '\n'; 
 » 4 days ago, # |   0 I'm sure this is inadvertant, but in problem 1801A, after submitting any wrong solution, the pattern is literally visible in jury's answer xD.
 » 2 days ago, # |   0 Can somebody explain solution to Div 1. C? I can't understand what the editorial says.