**Hint**

**Tutorial**

811B - Vladik and Complicated Book

**Hint**

**Tutorial**

**Challenge**. Can you solve the problem with *n*, *m* ≤ 10^{6}?

811C - Vladik and Memorable Trip

**Hint 1**

**Hint 2**

**Tutorial**

**Challenge**. Can you solve the problem with *n*, *a*[*i*] ≤ 10^{5}? Try to use the fact, that .

811D - Vladik and Favorite Game

**Hint 1**

**Hint 2**

**Tutorial**

**Challenge**. Assume this problem: let's change all dangerous cells on walls, i.e such cells, in which it is just impossible to enter. Now you have to generate such string from moves 'L', 'R', 'U', 'D', that without dependance on possible button breakage of pairs 'L'/'R' and 'U'/'D', as in original problem, will visit finish cell. Of course, it is not necessary to stop at finish cell, you just have to visit it at least once.

811E - Vladik and Entertaining Flags

**Hint**

**Tutorial**