Want to get updates? You can add the feed link to your favourite feed reader. For email updates, you could subscribe via feedrabbit.

#competitive-programming

A quantum-inspired solution to a CP problem

I came across a very interesting problem in a recent team contest. Given some array $a$, we were asked to transform it into $b$ where each element of $b$ was some weighted summation of the elements of $a$. Though its solution is very old and well-known, I found thinking of it as a quantum algorithm quite useful and enlightening.

Read more...

Function optimization - a problem from AdventOfCode 2021

This is my approach for the 7th problem of AdventOfCode 2021, including some related variations that I came up with. I’ll be using R to implement the solutions.

Read more...

ICPC WF 2020, Problem F. Ley Lines

Solution and explanation for Problem F. Ley Lines from the ICPC World Finals 2020, along with the implementation.

Read more...

ICPC WF 2020, Problem C. Domes

Solution and explanation for Problem C. Domes from the ICPC World Finals 2020, along with the implementation.

Read more...

[CP] Approaching Geometry Problems

November 08, 2021

This week, I will be hosting a session on Geometry at the IIIT-H programming club, where I plan to discuss a few techniques and problems.

At first sight, computational geometry might seem very hard and intimidating. But once you familiarize yourself with some basic tools and tricks, you’ll become a geometry expert! Let’s break the myth “geometry is hard” together!

Read more...

[Haskell for CP] Solving an interactive problem using laziness

Haskell is an interesting and beautiful language for many reasons. One is laziness, which lets us write very elegant computation recipes.

I will attempt to solve an interactive CP problem from a recent codeforces contest - Guess the K-th Zero.

Read more...

[Haskell for CP] Exploiting laziness for memoized DPs

In this blog I attempt to solve the Partition Problem using Haskell. The key is to utilize laziness to cleanly express the standard dynamic-programming solution for the problem.

Read more...

[Haskell for CP] Some Basic Problems

This week I will be discussing a couple of basic problems: Repetitions and GCD on Blackboard

Read more...

[Haskell for CP] Knapsack DP reinvented

Here is the problem Money Sums that I shared in my last blog

You have $n$ coins, with values $x_1, x_2 \ldots x_n$. You have to find all possible totals you can form with them.

Read more...
Blogs Home | Full Blogs List | All Tags