IOI05A - Editorial

PROBLEM LINKS:

Practice
Contest

DIFFICULTY:

Easy-Medium

PREREQUISITES:

two pointers, prefix sums

SOLUTION:`

http://olympiads.win.tue.nl/ioi/ioi2005/contest/ioi2005-tasks-and-solutions-a5.pdf

EDITORIALIST’S SOLUTION:

Can be found here.