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
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
相关文章推荐
- 嵌入式公司常考的一道指针题目:直接给内存地址赋值
- 我希望早几年知道的 5 个 Unix 命令
- Redis与Memcached的区别
- 不同数据类型与Json之间的转换
- LeetCode 4 Median of Two Sorted Arrays
- codeforces #312 558A A. Lala Land and Apple Trees(暴力)
- MVVM开源框架Knot.js 教程1 - CBS初步
- nginx.conf配置说明
- loadView和viewDidLoad的用法
- 数据库性能优化(MySQL)
- 内存管理: alloc, retain, release, autorelease, copy, assign
- HDU 4788 Hard Disk Drive
- linux系统编程:进程间通信-mmap
- SpringMVC框架的工作原理
- 如何禁用防火墙激活CleanMyMac 3
- 第六章总结
- 栈的程序演示
- 通知与消息机制
- 剑指off-打印1到n
- 多线程、锁,可重入,同步,原子性,可见性,非阻塞算法