Buildings

AtCoder
IDabc353_a
Time2000ms
Memory256MB
Difficulty
There are $N$ buildings aligned in a row. The $i$\-th building from the left has a height of $H_i$. Determine if there is a building taller than the first one from the left. If such a building exists, find the position of the leftmost such building from the left. ## Constraints * $1 \leq N \leq 100$ * $1 \leq H_i \leq 100$ * All input values are integers. ## Input The input is given from Standard Input in the following format: $N$ $H_1$ $H_2$ $\ldots$ $H_N$ [samples]
Samples
Input #1
4
3 2 5 2
Output #1
3

The building taller than the first one from the left is the third one from the left.
Input #2
3
4 3 2
Output #2
\-1

No building is taller than the first one from the left.
Input #3
7
10 5 10 2 10 13 15
Output #3
6

The buildings taller than the first one from the left are the sixth and seventh ones. Among them, the leftmost is the sixth one.
API Response (JSON)
{
  "problem": {
    "name": "Buildings",
    "description": {
      "content": "There are $N$ buildings aligned in a row. The $i$\\-th building from the left has a height of $H_i$. Determine if there is a building taller than the first one from the left. If such a building exists,",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc353_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "There are $N$ buildings aligned in a row. The $i$\\-th building from the left has a height of $H_i$.\nDetermine if there is a building taller than the first one from the left. If such a building exists,...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments