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

6933번 - Strategic Bombing 다국어

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

문제

The Enemy relies heavily on the transportation of supplies and personnel between the specific points A and B. Points A and B, as well as other points C, D, E, etc. are linked by a network of roads. Your mission, should you accept it, is to identify a single road that may be bombed in order to cut off all traffic between A and B.

In the input, each point is identified by a single upper-case letter (there is a maximum of 26). Each line of input identifies a pair of points connected by a road. The end of input is indicated by a line containing **. All roads are two-way, that is, road AC is the same as road CA. There is at most one road between any pair of points.

Your output should identify all roads such that bombing any one of them would halt all traffic between A and B. Your output should list the roads, one per line, followed by a line stating that There are n disconnecting roads., where $n$ is the number of such roads. If there is no such road, output There are 0 disconnecting roads..

입력

출력

제한

예제 입력 1

AC
AD
AE
CE
CF
ED
GF
BG
HB
GH
**

예제 출력 1

CF
GF
There are 2 disconnecting roads.

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2001 > CCC 2001 Junior Division 5번

Olympiad > Canadian Computing Competition & Olympiad > 2001 > CCC 2001 Senior Division 3번

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

출처

대학교 대회

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

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