#CCBCHBAHAI0000158. In tất cả vị trí của x (Print All Positions of x)
In tất cả vị trí của x (Print All Positions of x)
Print All Positions of x
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer array and an integer , list all -based indices such that , in increasing order.
If there is no match, print -1.
Input
- The first line contains integers and .
- The second line contains integers .
Output
- If at least one match exists, print all matching indices on one line, separated by spaces.
- Otherwise print
-1.
Subtasks
Subtask 1 (100 points): ; .
Examples
Input
8 4
4 1 4 2 4 4 7 0
Output
0 2 4 5
Explanation
Value occurs at indices , so all four indices are printed from left to right.