#K89257. Most Liked Photos
Most Liked Photos
Most Liked Photos
You are given a list of integers representing the number of likes each photo received. Your task is to determine the maximum number of likes among the photos and output the 1-based indices of all photos that received that maximum number of likes. The indices should be in increasing order. For example, if the input list is ( [10,\ 20,\ 10,\ 20,\ 5] ), then the maximum number of likes is (20) and the photos at indices (2) and (4) have the maximum likes.
inputFormat
The first line contains an integer (n) ((1 \leq n \leq 10^5)), the number of photos. The second line contains (n) space-separated integers where each integer denotes the number of likes a photo received.
outputFormat
Print two lines:
- The first line contains the maximum number of likes.
- The second line contains the space-separated 1-based indices of the photos that received the maximum likes.## sample
5
10 20 10 20 5
20
2 4
</p>