A Problem for Testing a New Regrade Method

Time limit5sMemory limit512 MB

Summary
Read two integers A and B, print their sum, then read N numbers and print them sorted in ascending order.
Level

Easy2 of 10

Topics
Sorting, Implementation
Solved
No attempts yet

Problem

Let's do A+B, and also do a sort.

Right now all the sources for the regrade have been gathered, so submissions are closed.

Input

The first line gives A and B.

The second line gives N.

The third line gives N numbers.

Output

On the first line, print A+B.

On the second line, print the N numbers sorted in ascending order.

Constraints

  • 1 ≤ A, B ≤ 10
  • 1 ≤ N ≤ 1,000,000
  • 1 ≤ each of the N numbers ≤ 1,000

Hint

After all the regrade tests finish, this problem changes to "preparing for judging".

Until then, try submissions that produce various results.

Examples1

  1. Example 1

    Input
    3 6
    5
    1 2 3 1 2
    
    Expected output
    9
    1 1 2 2 3