시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 18 13 12 85.714%

문제

In IOI 2018, we will record names of person who enters the arena. The record will consist of uppercase letters of the Latin alphabet and/or lowercase ones. To make it easier to read, you will have to convert uppercase letters on the record to lowercase.

구현

You should implement the following procedure and function:

init(int N)
  • This procedure is called only once, before any calls to convert.
  • N: the number of names in the record.
string convert(string s)
  • This function is called N times after init is called.
  • s: the name in the record.
  • This function should convert uppercase letters in the string s to lowercase, and return the result t.

예제

init(3)

There are 3 names on the record in this example. Then the grader makes the following procedure calls:

Call Return
convert("WatanabE") "watanabe"
convert("ITO") "ito"
convert("YamaMoto") "yamamoto"

The files sample-01-in.txt and sample-01-out.txt in the zipped attachment package correspond to this example. Other sample inputs/outputs are also available in the package.

제한

  • 1 ≤ N ≤ 100
  • 1 ≤ |s| ≤ 20 (Here |s| is the length of the string s.)

서브태스크

번호 배점 조건
1 60

N ≤ 10

2 40

No additional constraints

샘플 그레이더

The sample grader reads the input in the following format:

  • line 1: N
  • line 1 + i (1 ≤ iN): si

The sample grader first calls init(N), and then convert(s) for s = si (i = 1, 2, ..., N). It prints the return values of convert in the following format (Now, ti is the return value of convert(s) for s = si):

  • line i (1 ≤ iN): ti

제출할 수 있는 언어

C++17, C++14, C++20, C++14 (Clang), C++17 (Clang), C++20 (Clang)

채점 및 기타 정보

  • 예제는 채점하지 않는다.