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

32017번 - Orphan Backups 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB85562.500%

문제

GigantoCorp has a problem. They have removed all tape drives from their data center and are doing all of their backups to disk storage. However, they seem to have used more disk space than their backup software indicates should be in use. They think that there are files on the backup storage that are not in the backup software index. They would like your team to write a program to determine if there are"orphan" files on the backup storage that are not in the index or "orphan" index entries that have no corresponding files on the backup storage.

Your program will be provided with two lists -- an index of valid backup image names, followed by a list of backup file names.

Your program is to compare the two lists and determine if there are either backup images in the index that have with no files or files that are not associated with any backup image in the index.

입력

Input is structured in two blocks.

The first is a list of backup images, one per line. Each backup image name consists of 1ドル$ to 32ドル$ printable ASCII characters (no spaces). There may be up to 100ドル,000円$ images. Each image name is unique, and they may occur in any order.

The end of this block is signaled by an empty line.

The second block contains a list of backup file names, one per line, left justified. A backup file name has the format

imageName_integer_type

where imageName is a backup image name in the format described above, integer is an integer in the range 0ドル\ldots 2,000円,000円,000円$ denoting the time in seconds since January 1, 1970 at 00:00 GMT (the "UNIX epoch"), and type is an uppercase alphabetic character string of 1ドル$ to 6ドル$ characters. There may be up to 300ドル,000円$ backup file names. File names are unique, and they may occur in any order.

The end of the second block is signaled by the end of file.

출력

First, print the list of files with no index entries, one per line, by printing the character "F", a single space, and then the file name.

After all the orphan files are printed, print the orphan index entries one per line by printing the character "I", a single space, and then the backup image name.

Entries in each list are to be printed in ASCII lexicographic order.

If every file has an index entry and every index entry has one or more files, print only a line containing the string "No mismatches.".

제한

예제 입력 1

payroll.xls
projects.doc
employees.dat
products.txt
payroll.xls_1539199053_INCR
employees.dat_1539199053_INCR
payroll.xls_1539112653_INCR
employees.dat_1539112653_INCR
payroll.xls_1539026253_FULL
employees.dat_1539026253_FULL
customers.dat_1539026253_FULL

예제 출력 1

F customers.dat_1539026253_FULL
I products.txt
I projects.doc

힌트

출처

ICPC > Regionals > North America > Mid-Atlantic Regional > 2018 Mid-Atlantic USA Regional Contest B번

ICPC > Regionals > North America > Southern California Regional > 2018 Southern California Regional 1번

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

출처

대학교 대회

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

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