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

20104번 - Timecard 서브태스크다국어언어 제한함수 구현

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB29313011643.774%

문제

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.)

서브태스크

번호배점제한
160

N ≤ 10

240

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

출처

Olympiad > International Olympiad in Informatics > IOI 2018 > Practice 3번

제출할 수 있는 언어

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

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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