Logo
(追記) (追記ここまで)

25099번 - Anagram 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 (추가 시간 없음) 256 MB25515812360.000%

문제

Two words are anagrams if the letters of the first word can be reordered to obtain the second one. An instance of anagrams is the pair “listen” and “silent”.

You are given a list of words, each word consisting of lowercase letters. Your goal is to filter this list by dropping any word whose anagram has already appeared earlier on the list.

입력

The first line contains $n,ドル the length of the list. This is followed by $n$ lines, each containing one word.

출력

Print out the list of words without anagrams, one word per line. The words should appear in the same order as given in the input.

제한

  • 1ドル ≤ n ≤ 10^5$
  • All letters are lowercase letters of the English alphabet.
  • Length of any word will not exceed 100ドル$.

예제 입력 1

5
listen
santa
satan
silent
cat

예제 출력 1

listen
santa
cat

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CERC 2021 연습 세션 X번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /