CF877A.Alex and broken contest
普及-
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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.
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.
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".
Names are case sensitive.
一天,Alex 正在为他的朋友们创建一场编程竞赛,却不慎将其删除了。幸运的是,所有题目都已保存下来,但现在他需要从大量题目中找出属于这场竞赛的题目。
然而题目数量太多,无法手动完成。Alex 请你编写一个程序,根据题目的名称来判断该题目是否属于这场竞赛。
已知:一道题目属于这场竞赛,当且仅当它的名称恰好包含 Alex 的一位朋友的名字一次。Alex 的朋友们的名字是:"Danil"、"Olya"、"Slava"、"Ann" 和 "Nikita"。
名字区分大小写。
输入格式
The only line contains string from lowercase and uppercase letters and "_" symbols of length, not more than 100 — the name of the problem.
唯一的一行包含一个由小写字母、大写字母和下划线 "_" 组成的字符串,其长度不超过 100 —— 即该题目的名称。
输出格式
Print "YES", if problem is from this contest, and "NO" otherwise.
如果该题目来自本场竞赛,则输出 “YES”,否则输出 “NO”。
输入输出样例
输入#1
Alex_and_broken_contest
输出#1
NO
输入#2
NikitaAndString
输出#2
YES
输入#3
Danil_and_Olya
输出#3
NO
输入解题思路,AI测评打分。不知道怎么写?