#CCBCHBAHAI0000006. In k phần tử cuối (Print the Last k Elements)
In k phần tử cuối (Print the Last k Elements)
Print the Last k Elements
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
You are given an integer array of length , indexed from to , and an integer satisfying . Print exactly the last elements. The first required index is and the last is .
Input
- The first line contains two integers and .
- The second line contains exactly integers .
Output
Print on one line, separated by spaces.
Subtasks
Subtask 1 (20 points): , , .
Subtask 2 (30 points): , , .
Subtask 3 (50 points): , .
Examples
Input
6 3
3 1 4 1 5 9
Output
1 5 9
Explanation
Here and . The first required index is . Thus we print , namely 1 5 9.