[BOJ 15098] No Duplicates

View as PDF

Submit solution

Points: 1
Time limit: 2.0s
Memory limit: 512M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

There is a game in which you try not to repeat a word while your opponent tries to see if you have repeated one.</p>

"THE RAIN IN SPAIN" has no repeats.

"IN THE RAIN AND THE SNOW" repeats THE.

"THE RAIN IN SPAIN IN THE PLAIN" repeats THE and IN.

Write a program to test a phrase.

입력 형식

Input is a line containing words separated by single spaces, where a word consists of one or more uppercase letters. A line contains no more than 80 characters.

출력 형식

The output is "yes" if no word is repeated, and "no" if one or more words repeat.

예제 입력 1

THE RAIN IN SPAIN

예제 출력 1

yes

예제 입력 2

IN THE RAIN AND THE SNOW

예제 출력 2

no

예제 입력 3

THE RAIN IN SPAIN IN THE PLAIN

예제 출력 3

no

Comments

There are no comments at the moment.