549. Daily Temperature

0

Medium

You want warmer days to go outside the home. You are given an array of integers ***temperatures*** represents the daily temperatures, print an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.

Input Format

First line contains an integer n .
Second line contains an integer array of size n.

Output Format

Print the answer array.

Example

Input

8 73 74 75 71 69 72 76 73

Output

1 1 4 2 1 1 0 0

Constraints

1<= n <= 104
30 <= temperatures[i] <= 100
Loading...

View Submissions

Console