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

6201번 - New Cow Brands 다국어

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

문제

The cows are beside themselves: Farmer John has decided to use RFID tags instead of branding the cows with red-hot irons that cause intense pain.

The RFID tags contain a code that is N (3 <= N <= 15) characters (each in the range 'A'..'Z') in length. No character appears twice in the code. The character chosen for any given position in the code is chosen from a supplied set for that position. The set is always given in alphabetical order.

A machine generates the codes in alphabetical order. Each new batch of cows uses the next unused set of codes. FJ keeps track of the number of codes he has already used.

Help FJ confirm the RFID brands to be used for the next set of cows. Given the count of the starting and finishing brands (1 <= start < finish <= 22,000,000 and finish-start < 2000), print (in alphabetical order) the brands that will be used. See the I/O specifications for an example.

입력

  • Line 1: Three space-separated integers, respectively: N, start, and finish.
  • Lines 2..N+1: Line i+1 contains a number (1..26) of characters that are the valid characters for position i in the RFID code

출력

Lines 1..finish-start+1: Line i contains RFID code # start+i-1

제한

예제 입력 1

4 6 13
ABC
CDELQ
CFH
ABC

예제 출력 1

ADHB
ADHC
AECB
AEFB
AEFC
AEHB
AEHC
ALCB

힌트

Here are the first 20 codes:

 1 ACFB 5 ADFC 9 AEFB 13 ALCB 17 ALHC
 2 ACHB 6 ADHB 10 AEFC 14 ALFB 18 AQCB
 3 ADCB 7 ADHC 11 AEHB 15 ALFC 19 AQFB
 4 ADFB 8 AECB 12 AEHC 16 ALHB 20 AQFC

출처

Olympiad > USA Computing Olympiad > 2006-2007 Season > USACO November 2006 Contest > Bronze 1번

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

출처

대학교 대회

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

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