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

9793번 - Length and Frequency of Sentences 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB20313711366.082%

문제

In machine translation (MT) system, the length of sentences affects the performance of a MT system. The analysis of the length of sentences is one of factors to assess the difficulty of translation.

Ar-Ku+ Translation Company asks the contestants to analyze the set of sentences in English news. The information that needs to be extracted from the news is the length of the sentences and the frequency of each length. Words in a sentence are separated by a space (or spaces). We can assume that there are no other white spaces such as tab.

입력

The first line of the input contains an integer N (1 ≤ N ≤ 4,000) indicating the number of sentences. The following N lines are sentences, one sentence in each line. A sentence has between 2 to 75 words inclusive.

출력

Print out, in each line, the length of sentences that occurs in the input text and its frequency. The two values are separated by a space. The output must be sorted by the first value.

제한

예제 입력 1

7
This is an example.
Do you really understand this problem?
Yes, I really do.
This sentence has 5 words.
It's not difficult, isn’t it?
X Y Z @ # % & * ! ( ) <*-*>
The end.

예제 출력 1

2 1
4 2
5 2
6 1
12 1

힌트

출처

ICPC > Regionals > Asia Pacific > Thailand > Thailand Southern Programming Contest > Thailand Southern Programming Contest 2011 D번

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

출처

대학교 대회

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

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