#CCBCHBAHAI0000063. Statistics (Statistics)
Statistics (Statistics)
Statistics (Statistics)
Source: Problem Solving and Program Design in C
Version: Phuoc Hung OJ Extended
Problem
The input contains multiple data sets until EOF. Each data set is one line containing followed by .
For case starting from , compute
and
Thus is the first maximum position and the last minimum position. Indices are 0-based.
Input
Each line is one data set: n a_0 a_1 ... a_{n-1}. Read until EOF.
Output
For case , print Case c: m M R p q.
Subtask
Subtask 1 (20 points): Mỗi file có không quá bộ; , .
Subtask 2 (30 points): Mỗi file có không quá bộ; , .
Subtask 3 (50 points): Mỗi file có không quá bộ; , .
Example
Input
5 3 1 8 8 1
4 -2 -2 -2 5
Output
Case 1: 1 8 7 2 4
Case 2: -2 5 7 3 2
Explanation
The sample follows the definitions and rules above.