Errichto Hard Algorithms
Sliding Window Problems | CSES
updated
My CF problem-solving classes: codeforces.com/blog/entry/145162
also streaming on twitch.tv/errichto
Educational Codeforces Round 181 (Div. 2) codeforces.com/contest/2125
also streaming on twitch.tv/errichto
Mainly problems A-E from Educational Codeforces Round 179 (Div. 2) codeforces.com/contest/2111
also streaming on twitch.tv/errichto
Problems C, E, F from CF Round 1035 (Div. 2) codeforces.com/contest/2119
also streaming on twitch.tv/errichto
After installing Oracle VirtualBox with Linux Ubuntu, I'm setting up Geany and OBS.
Written guide: github.com/Errichto/youtube/wiki/Linux-&-Geany-Setup
also streaming on twitch.tv/errichto
0:00 start
9:32 A
12:37 B
20:48 C
40:20 D
50:50 E
1:08:37 F
2:44:25 G
also streaming on twitch.tv/errichto
also streaming on twitch.tv/errichto
- Token Removing codeforces.com/contest/2119/problem/D
- problems C-E from EPIC Institute of Technology Round Summer 2025 (CF 1036, Div. 1 + Div. 2) codeforces.com/contest/2124
also streaming on twitch.tv/errichto
0:00 Token Removing
32:42 solution summary
45:16 CF 1036
also streaming on twitch.tv/errichto
Also streaming on twitch.tv/errichto
Live chat: twitch.tv/errichto
live chat twitch.tv/errichto
Originally streamed live on Twitch twitch.tv/errichto
Minimum Euclidean Distance - https://cses.fi/problemset/task/2194
originally streamed at twitch.tv/errichto
Chat: twitch.tv/errichto
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Subscribe for more educational videos on algorithms, coding interviews and competitive programming.
- live streams: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
chat: twitch.tv/errichto
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
chat: twitch.tv/errichto
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
[ad] Train&Win high school contest: challenges.reply.com/tamtamy/challenge/2022-teen-train-win-1
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Paid classes: errichto.com/classes
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Paid classes: errichto.com/classes
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
0:00 Hi
1:33 1) Sqrt decomposition
5:29 sqrt(log) time complexity
9:35 2) Light and heavy
13:18 3) Sqrt decomposition by queries
18:13 4) Mo's algorithm
31:28 5) sqrt(S) distinct values
34:48 6) birthday paradox & baby/giant-step
37:12 P1. Instant Messenger
50:11 solution 2, sqrt decomposition
57:45 P2. Little Elephant and Array
1:03:50 P4. Counting Triangles
1:08:33 P5. Find Substring Pair
1:16:42 back to P4, code
1:22:16 Summary
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
codeforces.com/blog/entry/95768
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/errichto
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
0:00 Intro
3:10 [1800] Book codeforces.com/problemset/problem/1572/A
27:27 [1600] Carrying Conundrum codeforces.com/problemset/problem/1567/C
41:58 [1800] Compressed Bracket Sequence codeforces.com/problemset/problem/1556/C
1:07:31 O(N) solution
1:31:57 educational mentions
[1700] E2. Array Optimization by Deque codeforces.com/problemset/problem/1579/E2
[ARC-B] Cross-free Matching atcoder.jp/contests/arc126/tasks/arc126_b
1:33:45 Future plans
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Subscribe for more educational videos on algorithms, coding interviews and competitive programming.
- live streams: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
Subscribe for more educational videos on algorithms, coding interviews and competitive programming.
- live streams: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
0:00 Intro
0:30 A. Runway
12:37 B. Chainblock
28:55 C. Valet Parking (chapter 1)
56:29 C. Valet Parking (chapter 2)
1:55:59 D. String Concatenation
Subscribe for more educational videos on algorithms, coding interviews and competitive programming.
- live streams: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
0:00 Intro
3:20 Weak Typing (Round 1 A3)
58:35 Blockchain (Round 1 C)
1:12:13 Gold Mine (Qualification Round C2)
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
This is the last stream in July. See you in September!
0:00 Intro
0:54 Mostly A
14:21 Cloyster
35:38 Moving Car
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Final code and notes pastebin.com/J8G46FFp
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: http://discord.gg/errichto
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
0:00 Intro
0:13 A. Cherry
3:31 B. Cobb
13:33 C. Mikasa
30:25 D. Diane
1:01:13 E. You
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
0:00 Intro
1:47 A. Subsequence Permutation
10:42 B. Running for Gold
16:01 C. Maximize the Intersections
22:16 D. Array Differentiation
26:35 E. Colors and Intervals
51:42 F. Telepanting
1:09:16 G. A Serious Referee
2:21:10 H. Guess the Perimeter
2:22:25 I. Organizing a Music Festival
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: discord.gg/YWb3Bmg
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto
Live chat: twitch.tv/popout/errichto/chat?popout=
0:00 Intro
2:52 Maximum Subarray Min-Product leetcode.com/problems/maximum-subarray-min-product
35:00 Bricks Falling When Hit leetcode.com/problems/bricks-falling-when-hit
Homework: leetcode.com/problems/largest-rectangle-in-histogram & leetcode.com/problems/rank-transform-of-a-matrix
Streaming schedule: calendar.google.com/calendar/embed?src=0qldhlvr0oqd867pdi8nkm8s04%40group.calendar.google.com
- FAQ & GitHub Wiki: github.com/Errichto/youtube/wiki/FAQ
- Discord: http://discord.gg/errichto
- Twitch: twitch.tv/errichto
- Main YT channel with educational videos: youtube.com/errichto


