포럼
문제 COCI00461

Aron

설명

The holiday season is near! Aron wants to get gifts for his friends in Zagreb, so in order to
get them on time, he visited a famous toy store in London. After picking out the gifts, he went
to the register and discovered that there were already \(N\) people in line. Luckily, he noticed
that there were groups of people standing in line, in addition to individual customers. A group
of people consists of a customer and their friends waiting for them to complete the purchase.
The moment when the customer is done, they and their friends leave the line.
The people considered a group are standing one behind the other and are wearing shirts of
matching colour. Two adjacent groups, adjacent individuals or adjacent individual and a
group, will never be wearing shirts of the same colour.
Write a program that will, given the data on the people standing in line, output which person
in line Aron is.

제약
입력 형식

The first line of input contains the positive integer \(N\) (\(1 \le N \le 25\)) from the task.
Each of the following \(N\) lines contains a single character, an uppercase letter of the English
alphabet that represents the shirt colour of the \(i^{th}\) person in line.

출력 형식

You must output the required number from the task.

예제 1
입력
3
C
Z
P
출력
4
예제 2
입력
6
C
C
P
C
Z
Z
출력
5
예제 3
입력
6
B
B
B
B
B
B
출력
2
문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2017/2018 Contest 3

평가 및 의견

Aron

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Aron

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8