DMOPC '14 Contest 7 P1 - Finding Bessarion

View as PDF

Submit solution


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

Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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 N (1 \le N \le 10), the number of stations.
The next N 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

Comments


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

    final edit: i've been banned from the problem


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

      RIP


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

        How very unfortunate


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

    The review is actually 4.4 stars.


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

    Can a station name be repeated?


  • 0
    FatalEagle  commented on April 7, 2015, 3:38 p.m.

    It's being resolved right now.


    • 0
      FatalEagle  commented on April 7, 2015, 3:41 p.m. edited

      The test data had magic quotes. It's been fixed and all submissions are being rejudged.


  • 0
    FatalEagle  commented on April 7, 2015, 3:33 p.m.

    4x original limit to 128MB