#CCBCHBAHAI0000150. Số nhỏ nhất và vị trí (Lowest Number and Position)
Số nhỏ nhất và vị trí (Lowest Number and Position)
Lowest Number and Position
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer array , find the smallest value and its -based index.
All input values are distinct, so the minimum position is unique.
Input
- The first line contains an integer .
- The second line contains integers .
Output
Print exactly two lines:
Menor valor: v, where is the minimum value;Posicao: p, where is the -based index of .
The spelling, capitalization, colon, and lack of accents in these two labels must be preserved exactly.
Subtasks
Subtask 1 (100 points): ; ; all values are pairwise distinct.
Examples
Input
10
1 2 3 4 -5 6 7 8 9 10
Output
Menor valor: -5
Posicao: 4
Explanation
The minimum value is . It is stored at index when using -based indexing, so the two output lines are Menor valor: -5 and Posicao: 4.