#C3242. Inventory Reorder Challenge
Inventory Reorder Challenge
Inventory Reorder Challenge
You are given an inventory of N items along with their sales figures. The store management uses a reorder threshold, τ, to determine which items should be reordered. An item must be reordered if its sales quantity s_i satisfies the inequality $$ s_i < \tau $$.
Your task is to read the inventory details from the standard input and output the 1-based indices of those items that need to be reordered. If every item satisfies $$ s_i \geq \tau $$, output the string No reorders
. Indices should be printed in a single line separated by a space if there is more than one.
inputFormat
The input is given via standard input and consists of three parts:
-
An integer N representing the number of items.
-
A line containing N integers separated by spaces, where each integer represents the sales quantity of an item.
-
An integer representing the reorder threshold, (\tau).
outputFormat
Output a single line to standard output: if there are items requiring reorder (i.e. items with sales less than the threshold), print their 1-based indices separated by a single space. Otherwise, output the string No reorders
.## sample
5
3 10 6 2 8
5
1 4