#ENGLISHP35. Stock Exchange
Stock Exchange
Description
Given the predictive stock prices P of N days. Find two days I and J to buy and sell the stock. I is less than J and (P[J] minus P[I]) should be maximum.
Input Format
First line: one positive integers N (N <= 100).
Second line: N positive integers P[i] (P[i] <= 1000).
Output Format
Two integers I and J.
5
3 5 4 6 2
1 4