codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

877A.md (1153B)


      1 Source: https://codeforces.com/problemset/problem/877/A
      2 
      3 A. Alex and broken contest
      4 
      5 time limit per test
      6 
      7 2 seconds
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 standard input
     16 
     17 output
     18 
     19 standard output
     20 
     21 One day Alex was creating a contest about his friends, but accidentally deleted it. Fortunately, all the problems were saved, but now he needs to find them among other problems.
     22 
     23 But there are too many problems, to do it manually. Alex asks you to write a program, which will determine if a problem is from this contest by its name.
     24 
     25 It is known, that problem is from this contest if and only if its name contains one of Alex's friends' name exactly once. His friends' names are "Danil", "Olya", "Slava", "Ann" and "Nikita".
     26 
     27 Names are case sensitive.
     28 
     29 Input
     30 
     31 The only line contains string from lowercase and uppercase letters and "_" symbols of length, not more than 100 — the name of the problem.
     32 
     33 Output
     34 
     35 Print "YES", if problem is from this contest, and "NO" otherwise.
     36 
     37 Examples
     38 
     39 Input
     40 
     41 ```
     42 Alex_and_broken_contest
     43 ```
     44 
     45 Output
     46 
     47 ```
     48 NO
     49 ```
     50 
     51 Input
     52 
     53 ```
     54 NikitaAndString
     55 ```
     56 
     57 Output
     58 
     59 ```
     60 YES
     61 ```
     62 
     63 Input
     64 
     65 ```
     66 Danil_and_Olya
     67 ```
     68 
     69 Output
     70 
     71 ```
     72 NO
     73 ```