## DMOPC '14 Contest 6 P1 - Finding Bessarion

View as PDF

Points: 3
Time limit: 2.0s
Memory limit: 128M

Author:
Problem type

Bessarion Station is perhaps the TTC's most unique subway station as the mystery behind it has attracted countless urban explorers. In fact, it's the only station that has a 5-star review on Google and a "documentary" that uncovers its secrets.

Many of them have suggested places of where the station might be, and have sent you various lists of stations. Knowing that it is next to both Leslie and Bayview stations, output Y if the list is valid or N if it is not.

#### Input Specification

The first line contains , the number of stations.
The next lines contain the name of the station.

#### Output Specification

Output Y if the list is valid or N if it is not.

#### Sample Input 1

5
Sheppard-Yonge
Bayview
Bessarion
Leslie
Don Mills

#### Sample Output 1

Y

#### Sample Input 2

4
Leslie
Queen's Park
Bessarion
Bayview

#### Sample Output 2

N

• commented on Oct. 22, 2019, 7:38 p.m. edit 2

final edit: i've been banned from the problem

• commented on Oct. 22, 2019, 10:14 p.m.

RIP

• commented on Oct. 22, 2019, 11:45 p.m.

This comment is hidden due to too much negative feedback. Show it anyway.

• commented on Sept. 30, 2017, 10:07 a.m.

The review is actually 4.4 stars.

• commented on Nov. 21, 2015, 12:51 p.m.

Can a station name be repeated?