#P9301. Optimal Event Day Selection
Optimal Event Day Selection
Optimal Event Day Selection
You are trying to schedule a special event on one of five possible days. Your job is to determine on which day you should schedule the event, so that the largest number of interested people are able to attend.
Formally, given five integers \(a_1, a_2, a_3, a_4, a_5\), find the smallest index \(k\) such that \(a_k = \max(a_1, a_2, a_3, a_4, a_5)\).
inputFormat
The input consists of a single line containing five space-separated positive integers. Each integer represents the number of people available to attend the event on days 1, 2, 3, 4, and 5 respectively.
outputFormat
Output a single integer: the 1-indexed day on which the event should be scheduled so that the maximum number of interested people can attend. In case of a tie, choose the earliest day with the maximum count.
sample
10 20 30 40 50
5