· Olympiad in Informatics

P3628: [APIO2010] Commando — Solution & Slope Optimization Analysis

Let’s first work out the ordinary DP equation for this problem. Obviously, after maintaining prefix sums, at \(f[i]\) we just enumerate a point \(j\) to split at:

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

BZOJ3450: Easy — Solution

A really nice problem, just right for a probability-and-expectation newbie like me to take on.

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

Educational DP Contest: M – Candies — Solution

Stupid me even went and did a multiset inclusion–exclusion, just to make myself miserable.

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

[Fortuna OJ] Feb 26th – Group A Problem-Solving Report

Honestly, this is my weakest area, and it was laid completely bare during the contest.

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

[Fortuna OJ] Feb 25th – Group A Problem-Solving Report

A really fun math problem; let's analyze it. Original notes: https://comfortablecom.wordpress.com/2017/10/06/jzoj-b%E7%BB%84-10-6-%E6%80%BB%E7%BB%93/

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Things

Microsoft on MWC 2019 - Thoughts After Watching

Computing is embedded in our life.

It is not combined in a single device.

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

CH3801: Rainbow's Signal — Solution

This problem is pretty interesting; at the end of the day it all comes down to bitwise operations. First, a sufficient conclusion is that the probability of picking an interval of length \(1\) is \(\frac{1}{N^2}\), while for length greater than 1 it is \(\frac{2}{N^2}\). Then, enumerate over the length of an \(int\), \(i \in [0,30]\), put the \(i\)-th bit of every number into a sequence and scan it, and when the scan reaches the \(j\)-th number, do case analysis.

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

BZOJ1101: [POI2007] Zap — Solution

This is a really good problem; it contains a lot of the techniques of number theory.

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

Codeforces 451E: Devu and Flowers — Solution

This problem requires knowledge of multisets. If you haven’t learned it, see the multiset section of this blog post.

Continue reading →Chinese original · English translation by Claude Opus 5.5

· Olympiad in Informatics

POJ2480: Longge's Problem — Solution

Given \(n\), compute \(\sum_{i=1}^{n} \gcd(i,n)\).

Continue reading →Chinese original · English translation by Claude Opus 5.5