Hi,

From now on, we are going to provide video editorials for Codeforces rounds. So, **Codeforces rounds are not going to be limited to text editorials, but also video editorials!**

We want to seek feedback and try to improve these video editorials as much as possible. We will try different ideas like recorded videos and livestreams to see which one helps you the best. So, please help us make a better content for you!

The blog will be shortly accessible in contest materials.

## 1986A — X Axis

## 1986B — Matrix Stabilization

## 1986C — Update Queries

## 1986D — Mathematical Problem

## 1986E — Beautiful Array

## 1986F — Non-academic Problem

## 1986G — Permutation Problem

I hope it helps!

Why

it would help beginners ig

Because he thinks about others as well.

Kring

I believe text was much better for learning where you can take hints from each line and then work your way out to solve the problem.

you are handsome bro

why is not anyone solving d with dp i can not understood

Because using dp, the order of computation can't be controlled. For e.g., 2*3+4. First, it will go in-depth and compute (3+4), then multiply it with 2. which does not comply with the precedence of operators. You got accepted because the minimum value will be achieved by multiplying (if it's 1); otherwise, performing addition. Multiplying by 1 does not change the result, so the order does not matter. I have ignored the edge cases when min 0 is achievable and n <=3

ya i understood now i also read the code of others i understood the conditions

I solved it with dp: 267111101

can u explain ur approach in dp recursion?

codeProblem E; wrong answer 5th numbers differ — expected: '118834745', found: '123022038' my code is failing this test case, can someone help me? i could come up with the entire solution on my own apart from the prefix and suffix sum stuff to find the element that needs to go in the middle, i'm struggling to understand how i would use prefix and suffix to find this element, can someone explain how it would work? I did it in a different way in my code but it's missing this test case-Oh for fucking love of god, please don't paste your shitty code like this.

1. Use a spoiler

2. Use the Code block feature that codeforces provides

like this:

Codethanks buddy lol

Video tutorials might be targeting certain group of individuals usually beginners and

text tutorialsmight beconciseandleave enough room for the individuals to thinkand figure why the solution works by themselves.I think

text tutorials are neededirrespective of video tutorials,I

presumevast majority ofproblem solvers prefer text tutorials?Let me know what you guys think.

Video solutions are my last resort when I can't understand what editorial is trying to say / the approach is too unintuitive. Otherwise, I see no reason it putting link for a video here.

Thank you Shayan

My G's code is O(n^2) ,but it passed.

I did G1 through brute force, that is checking each for the condition. Resulting in O(n^2). Its failing at when len is around 30k+. Wanted to know whats the difference bw g1 and g2 problem?