UVa 10199

From Algorithmist

Jump to: navigation, search

Contents

[edit] 10199 - Tourist Guide

[edit] Summary

This is a classic Graph Theory problem of finding Articulation Point.

[edit] Explanation

All there is to the problem is finding the Articulation Point of a given graph. Use the standard algorithm.

[edit] Input

6
sugarloaf
maracana
copacabana
ipanema
corcovado
lapa
7
ipanema copacabana
copacabana sugarloaf
ipanema sugarloaf
maracana lapa
sugarloaf maracana
corcovado sugarloaf
lapa corcovado
5
guanabarabay
downtown
botanicgarden
colombo
sambodromo
4
guanabarabay sambodromo
downtown sambodromo
sambodromo botanicgarden
colombo sambodromo
0

[edit] Output

City map #1: 1 camera(s) found
sugarloaf

City map #2: 1 camera(s) found
sambodromo
Personal tools