SashaT9's blog

By SashaT9, 18 months ago, In English

Many thanks to miaowtin and FBI for their invaluable help and support in the preperation of this blog. Unfortunately, this blog is not currently completed, but we encourage everybody to share their solutions to these and other problems of the section in comments. And last but not least thanks to pllk for maintaining CSES.

Shortest Subsequence

Prerequisites
Tutorial
Implementation

Swap Game

Prerequisites
Tutorial
Implementation

Prüfer Code

Prerequisites
Tutorial
Implementation

Acyclic Graph Edges

Prerequisites
Tutorial
Implementation

Multiplication Table

Prerequisites
Tutorial
Implementation

Advertisement

Prerequisites
Tutorial
Implementation

Special Substrings

Prerequisites
Tutorial
Implementation

Maximum Xor Subarray

Prerequisites
Tutorial
Implementation

Movie Festival Queries

Prerequisites
Tutorial
Implementation

Binary Subsequences

Prerequisites
Tutorial
Implementation

Programmers and Artists

Prerequisites
Tutorial

Bit Substrings

Prerequisites
Tutorial
Implementation
  • Vote: I like it
  • +32
  • Vote: I do not like it

»
15 months ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it

can i solve this problems as a Newibe ? is it hard for me or good?

pls help , i don't want to waste time

while(true){ thx++;}

»
13 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Binary Subsequences is mindblowing! Thanks for the solution.

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Regarding tutorial to Multiplication Table, how can you prove that the answer is always in the multiplication table? Because solution doesn't check for that.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Let $$$\texttt{med}=\lceil\frac{n^2}{2}\rceil$$$ the position of the element in the table we are looking for.

    Then we find such $$$x$$$ that $$$F(x)<\texttt{med}$$$ and $$$F(x+1)=\texttt{med}$$$, what guarantees that $$$x+1$$$ is present in the table (otherwise we would still have $$$F(x+1)<\texttt{med}$$$).