Powered by Starship v1.3

Tag: cses

main page
Cheesing CSES Cut and Paste with a skiplist
Mar 27 2025
8:16 PM

https://cses.fi/problemset/task/2072/

Treap is the intended solution to this task, but I didn't know treap well enough to write it on the spot. I did however know skiplist (which imo is less complicated) and so I ended up implementing this goofball:

...

read more

tags: programming cses

A possibly unusual way to solve CSES Increasing Array Queries
Mar 26 2025
12:08 PM

https://cses.fi/problemset/task/2416/

I had been kinda stuck on this for a while, mostly because I was trying to use some weird segtree bash.

...

read more

tags: programming cses

CSES Fixed-Length Paths I
Oct 4 2024
4:10 PM

Problem statement

Actually very similar problem to IOI11p2 (Race) which I did last weekend, using centroid decomposition and then naive dp. Decided to write this one in C*, which was surprisingly easy.

...

read more

tags: programming cses

alleged cses grind
Sep 2 2024
6:00 PM

@ the halfway point
it only gets harder...

read more

tags: programming cses

The m in logn stands for magic
Jul 19 2024
10:22 PM

I swear binary exponentiation on matrices is actually magic.

While explaining this CSES problem to a friend, it occured to me that I could improve my O(n) solution, which used state machine DP, into a O(log n) one, by using matrix exp.

But even though I've used it quite a few times before, it still feels like magic. Take this task for example:

...

read more

tags: programming cses math