CF467C George and Job

Description

The new ITone 6 has been released recently and George got really keen to buy it. Unfortunately, he didn't have enough money, so George was going to work as a programmer. Now he faced the following problem at the work. Given a sequence of $ n $ integers $ p_{1},p_{2},...,p_{n} $ . You are to choose $ k $ pairs of integers: $ [l_{1},r_{1}],[l_{2},r_{2}],...,[l_{k},r_{k}] (1

Input Format

The first line contains three integers $ n $ , $ m $ and $ k $ $ (1

Output Format

Print an integer in a single line — the maximum possible value of sum.