Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Shayan's blog

By Shayan, history, 4 hours ago, In English

1990A — Submission Bait

1990B — Array Craft

1990C — Mad MAD Sum

1990D — Grid Puzzle

1990E2 — Catch the Mole(Hard Version)

Not a formal proof! (please explain the formal proof of the algorithm in the comment section if you know that)

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

»
3 hours ago, # |
  Vote: I like it -6 Vote: I do not like it

Congrats for reaching 10K dude <3

  • »
    »
    110 minutes ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Thank you bro <3

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

Why video editorial?

  • »
    »
    3 hours ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    text editorials take time to complete , besides Shayan does some clean coding too , so its nice in the mean time.

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

Can someone please explain problem D? I understood everything in the editorial up until adding the second dimension to the dp array. I don't get that part, why do we add dp[i][j] where j can be {0,1,2,3}? And is there a way to solve this without adding this second dimension?

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

The "A.Submission Bait" problem really lives up to its name

»
2 hours ago, # |
  Vote: I like it +3 Vote: I do not like it

Problem D greedy solution with just 2 variables and one for loop: 271663296

Idea/Solution
  • »
    »
    113 minutes ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Same idea here, but tracking column indices instead: 271665697

  • »
    »
    103 minutes ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    trash ass solution. clearly codeforces is not for u lil bluh

    • »
      »
      »
      79 minutes ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      What didn't you like about it? Maybe we can improve if u tell us so.

»
81 minute(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

Please add Russian subtitles to the video