Problem Description

Read n tokens, find the first adjacent pair (i,i+1) which have different inferred type using rules: BOOL, INT, FLOAT, WORD. Output i (1-based) or -1 if all adjacent types are same.

Input Format

First line n. Second line n tokens.

Output Format

One integer index or -1.

Sample Test Case

Input:
6 10 20 3.0 4.5 6.0 7.0
Output:
2

Constraints

2

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next