Shayan's blog

By Shayan, 3 weeks ago, In English

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!

  • Vote: I like it
  • +34
  • Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it -18 Vote: I do not like it

Why

»
3 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

Kring

»
3 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

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.

»
3 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

you are handsome bro

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I solved it with dp: 267111101

»
3 weeks ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it
code

Problem 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-

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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:

    Code
»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Video tutorials might be targeting certain group of individuals usually beginners and text tutorials might be concise and leave enough room for the individuals to think and figure why the solution works by themselves.

I think text tutorials are needed irrespective of video tutorials,

I presume vast majority of problem solvers prefer text tutorials ?

Let me know what you guys think.

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

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

Thank you Shayan

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

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

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

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?