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

21173번 - ICPC Record Matching 다국어

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

문제

When using "software-as-a-service" offerings, a user often has a problem of matching records stored by the different services and determining if they refer to the same entity (person, account, order, etc.) The ICPC is no exception. While each participant has a record in the central ICPC registration system, additional "outside" applications may be used to collect and process information for functionality not provided by the central system.

Once an "outside" application is used, it becomes necessary to match the entries from both systems. Unfortunately, in spite of careful directions, sometimes it is not clear if records correspond to the same person. The primary sorts of mis-matches that occur are these:

  1. E-mail addresses do not match. This could be due to a misspelling, such as .eud instead of .edu, or different e-mail addresses that a participant used in the central ICPC system and the outside system.
  2. Exact names do not match. This could be due to a typing error, or varying use of legal names and nicknames.

Your team is to write a program that will read lists of people from the ICPC system and an outside system and determine which records in each system do not match a record in the other system. Two entries are considered matched if either the e-mail addresses are an exact match or the last name and first name are an exact match.

입력

Input to your program is two lists of name and e-mail address records. Each record consists of a first name, a last name, and an e-mail address, one per line, separated from each other by tabs. The first list is the records from the central ICPC registration system. This list ends with an empty line. The second list is the records from the outside application. The second list ends with the end-of-file. (These lists are suitable test data, not actual ICPC data.)

E-mail addresses do not exceed 64ドル$ characters in length. E-mail addresses consist of lower-case and upper-case English letters, digits, and the special characters at-sign, underscore, hyphen, and period. E-mail addresses do not begin with special characters.

First and last names do not exceed 24ドル$ characters in length. Names consist of lower-case and upper-case English letters and hyphens. Names do not begin with hyphens.

Each input list will contain at least 1ドル$ but not more than 2ドル,000円$ entries. E-mail addresses and (first name, last name) pairings will be unique within each list.

출력

Your program is to print lines showing the records from each list that could not be matched to the other list. Your program is to first print the central ICPC registration records that could not be matched, one per line. Each line should consist of the letter "I", a single space, the e-mail address, a single space, the last name, a single space, and the first name. These are to be printed in lexicographical e-mail address order. The e-mail addresses, last names, and first names are to be printed exactly the way they appear in the input. Once all such records are printed, the outside application records that could not be matched are to be printed the same way, except that each line should begin with the letter "O".

Case is to be ignored for all record matching comparisons and sorting.

Should all records from each system have a match in the other system, your program is to print a line containing only the string "No mismatches.".

제한

예제 입력 1

Bob Smith bsmith@gmail.com
Randy Nguyen rnguyen@gmail.com
Betty Jones jones123@gmail.com
Sallie Li SalLi@aol.com
Robert Smith bsmith@abc.edu
Quan Nguyen qnguy@xyz.edu
Betty Jones jones123@gmail.com
Sarah Leung sleung@mno.edu

예제 출력 1

I bsmith@gmail.com Smith Bob
I rnguyen@gmail.com Nguyen Randy
I SalLi@aol.com Li Sallie
O bsmith@abc.edu Smith Robert
O qnguy@xyz.edu Nguyen Quan
O sleung@mno.edu Leung Sarah

예제 입력 2

Camellia Woodley Camellia_Woodley3398@deavo.com
Leroy Thomas Leroy_Thomas7852@fuliss.net
Freya Campbell Freya_Campbell9926@ubusive.com
Eduardo Allen Eduardo_Allen3976@bauros.biz
Danny West Danny_West6110@twipet.com
Ed Allen eduardo_allen3976@bauros.biz
Daniel West Danny_West6110@twipet.com
camellia woodley camellia_woodley3398@deavo.com
Leroy Thomas Leroy_Thomas7852@fuliss.net
freya Campbell campbellf@deavo.net

예제 출력 2

No mismatches.

힌트

출처

ICPC > Regionals > North America > North Central North America Regional > NCNA 2020 K번

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

  • 문제를 만든 사람: Marc Furon
(追記) (追記ここまで)

출처

대학교 대회

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

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