您的位置:首页 > 其它

Uva11825 - Hackers' Crackdown

2015-07-15 19:28 417 查看
Miracle Corporations has a number of system services running in a distributed computer system which

is a prime target for hackers. The system is basically a set of N computer nodes with each of them

running a set of N services. Note that, the set of services running on every node is same everywhere

in the network. A hacker can destroy a service by running a specialized exploit for that service in all

the nodes.

One day, a smart hacker collects necessary exploits for all these N services and launches an attack

on the system. He nds a security hole that gives him just enough time to run a single exploit in each

computer. These exploits have the characteristic that, its successfully infects the computer where it

was originally run and all the neighbor computers of that node.

Given a network description, nd the maximum number of services that the hacker can damage.

Input

There will be multiple test cases in the input le. A test case begins with an integer N (1  N  16),

the number of nodes in the network. The nodes are denoted by 0 to N
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: