Skip to content

Commit 24be13f

Browse files
committed
[Bronze I] Title: No Duplicates, Time: 0 ms, Memory: 2028 KB -BaekjoonHub
1 parent dd23bb8 commit 24be13f

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <iostream>
2+
#include <map>
3+
4+
using namespace std;
5+
6+
int main() {
7+
string s;
8+
map<string, int> m;
9+
while (cin >> s) {
10+
m[s]++;
11+
if (m[s] > 1) return cout << "no", 0;
12+
}
13+
cout << "yes";
14+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# [Bronze I] No Duplicates - 15098
2+
3+
[문제 링크](https://www.acmicpc.net/problem/15098)
4+
5+
### 성능 요약
6+
7+
메모리: 2028 KB, 시간: 0 ms
8+
9+
### 분류
10+
11+
구현, 자료 구조, 문자열, 브루트포스 알고리즘, 집합과 맵
12+
13+
### 제출 일자
14+
15+
2026년 3월 1일 15:49:11
16+
17+
### 문제 설명
18+
19+
<p>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>
20+
21+
<p>"THE RAIN IN SPAIN" has no repeats.</p>
22+
23+
<p>"IN THE RAIN AND THE SNOW" repeats THE.</p>
24+
25+
<p>"THE RAIN IN SPAIN IN THE PLAIN" repeats THE and IN.</p>
26+
27+
<p>Write a program to test a phrase.</p>
28+
29+
### 입력
30+
31+
<p>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.</p>
32+
33+
### 출력
34+
35+
<p>The output is "yes" if no word is repeated, and "no" if one or more words repeat.</p>
36+

0 commit comments

Comments
 (0)