ELPHANT - Editorial

PROBLEM LINKS:

Practice
Contest

DIFFICULTY:

Medium

PREREQUISITES:

Sqrt Decomposition, Binary Search

SOLUTION:`

http://www.ioi2011.or.th/hsc/tasks/solutions/elephants.pdf

EDITORIALIST’S SOLUTION:

Can be found here.