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

12082번 - Bad Horse (Small1) 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 512 MB27719911063.218%

문제

As the leader of the Evil League of Evil, Bad Horse has a lot of problems to deal with. Most recently, there have been far too many arguments and far too much backstabbing in the League, so much so that Bad Horse has decided to split the league into two departments in order to separate troublesome members. Being the Thoroughbred of Sin, Bad Horse isn't about to spend his valuable time figuring out how to split the League members by himself. That what he's got you -- his loyal henchman -- for.

입력

The first line of the input gives the number of test cases, T. T test cases follow. Each test case starts with a positive integer M on a line by itself -- the number of troublesome pairs of League members. The next M lines each contain a pair of names, separated by a single space.

Limits

  • 1 ≤ T ≤ 100.
  • Each member name will consist of only letters and the underscore character.
  • Names are case-sensitive.
  • No pair will appear more than once in the same test case.
  • Each pair will contain two distinct League members.
  • 1 ≤ M ≤ 10.

출력

For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1) and y is either "Yes" or "No", depending on whether the League members mentioned in the input can be split into two groups with neither of the groups containing a troublesome pair.

제한

예제 입력 1

2
1
Dead_Bowie Fake_Thomas_Jefferson
3
Dead_Bowie Fake_Thomas_Jefferson
Fake_Thomas_Jefferson Fury_Leika
Fury_Leika Dead_Bowie

예제 출력 1

Case #1: Yes
Case #2: No

힌트

출처

Contest > Google > Google's Coding Competitions > Google APAC 2016 University Graduates Test > Practice Round APAC test 2016 A1번

Contest > Google > Google's Coding Competitions > Google of Greater China Test for New Grads of 2014 > Practice Round China New Grad Test 2014 A1번

Contest > Google > Google's Coding Competitions > EuroPython 2013 > EuroPython 2013 C1번

Contest > Google > Kick Start > Google Kick Start 2015 > Practice Round C1번

Contest > Google > Kick Start > Google Kick Start 2013 > Practice Round C1번

채점 및 기타 정보

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

출처

대학교 대회

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

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