IOI05B - Editorial

PROBLEM LINKS:

Practice
Contest

DIFFICULTY:

Medium

PREREQUISITES:

Math

SOLUTION:`

http://www.ioinformatics.org/locations/ioi05/contest/ioi2005-tasks-and-solutions-a4.pdf .

EDITORIALIST’S SOLUTION:

Can be found here.