Three balloons hung up from our team’s table, signifying the three problems we were able to solve out of the 12 so far. Restless, I glanced at the neighboring teams and their balloons. Five, six, seven, I count. Pressured, I returned to wracking my mind. I tried revisiting the countless training sessions we had and the programming problems I’ve solved before for an inkling of a hint to solve what was now in my hands. The clock ticks, the final minute passes, and the contest hall chants a countdown from 10.

Did my team win ICPC Asia-Singapore Regionals 2018? No…


In today’s “Is It Pythonable?” we dabble with some dynamic programming. And one of my favorite Python libraries.

Fibinary Numbers is a mashup of two concepts: binary numbers and the fibonacci sequence. Say, for the binary number 1010, the decimal equivalent is 10, because 1 x 2³ + 0x 2² + 1 x 2¹ + 0x 2⁰ = 10. In fibinary, we use the fibonacci sequence in place of the powers of two.

For reference, here’s the problem statement: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=16&page=show_problem&problem=704

The problem is rather simple. Given two fibinary numbers, output the sum in fibinary representation. So what we could do is take the two numbers, convert them to decimal, then turn the sum back to fibinary.

First thing’s…


In today’s “Is It Pythonable?” we deal with inversion counts. And some messy merge sort code.

Ultra QuickSort is a rather simple problem. You’re dealing with a certain sorting algorithm that processes a sequence of distinct integers by “swapping” two adjacent integers until the list is sorted. The task is to count how many swaps are needed in order to sort the list.

For reference, here’s the problem statement: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1751

We’re basically dealing with an Inversion Count problem. A sequence’s inversion count is a measure of the sequence’s “sortedness,” given by how many swaps are needed in order to sort the sequence. A sorted array’s count is 0. …

Blaise Cruz

Low-resource Natural Language Processing Researcher

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store