vaaven's blog

By vaaven, 8 days ago, translation, In English

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

1801B - Buying gifts

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
 
 
 
 
  • Vote: I like it
  • +127
  • Vote: I do not like it

»
7 days ago, # |
  Vote: I like it +25 Vote: I do not like it

Testcases aside, I thought this was generally a really cool round (or at least all the problems I tried).

»
7 days ago, # |
  Vote: I like it +14 Vote: I do not like it

What does SNM mean in tutorial of d1E?

»
7 days ago, # |
  Vote: I like it +8 Vote: I do not like it

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

  • »
    »
    7 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    If there are fewer shows, they can do another show to get more money

  • »
    »
    6 days ago, # ^ |
    Rev. 7   Vote: I like it +13 Vote: I do not like it

    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.

»
7 days ago, # |
  Vote: I like it +40 Vote: I do not like it

»
6 days ago, # |
  Vote: I like it +1 Vote: I do not like it

This round is a little difficult, but the tasks are really interesting. I love div 2C.

»
6 days ago, # |
  Vote: I like it +26 Vote: I do not like it

div1E smart solution is great!

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Can I solve solve Div1 B with ternary search? If so, why my solution 197805657 did'nt work for this? Can someone help me?

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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
  • »
    »
    3 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks ! Your solution is easier to prove its accuracy.

»
2 days ago, # |
  Vote: I like it -8 Vote: I do not like it

Why I changed N to 256,I got AC?

WA Code

AC Code

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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
»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

为什么没有中文版?

Why is there no Chinese version?