Diogo Peralta Cordeiro
Talks & Teaching · Problem sets

Competitive-Programming Problems

Problems I wrote for Programação Competitiva (CC3036) at the Department of Computer Science, University of Porto. Each comes with a full statement, a reference solution, an input generator and example I/O.

SoulMate Roulette

Geometry · image matching

Everyone has exactly one soul mate. Given a memory card full of 42×42 BMP eye-edge images, compute the all-pairs match likelihood using Hausdorff distance and emit the rankings — with a few bureaucratic edge cases to trip you up. Inspired by an xkcd What If?.

Hausdorff distanceBMP parsingAll-pairsJava reference
Read the statement →

Notas Emoji

Strings · UTF-8 decoding

A grade sheet got accidentally piped through an emoji encoder: letters became regional indicators, digits became keycaps, and random trailing spaces were sprinkled in. Decode it back to ASCII in C — multibyte parsing with no standard-library help.

UTF-8Regional indicatorsKeycapsC reference
Read the statement →

← Back to Talks & Teaching