1887Maximum Clique

1887   Maximum Clique

题目描述

Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique is the clique that has maximum number of vertex.

输入格式:

Input contains multiple tests. For each test:

The first line has one integer n, the number of vertex. (1 < n <= 50)

The following n lines has n 0 or 1 each, indicating whether an edge exists between i (line number) and j (column number).

A test with n = 0 signals the end of input. This test should not be processed.

输出格式:

One number for each test, the number of vertex in maximum clique.

输入样例 复制
5
0 1 1 0 1
1 0 1 1 1
1 1 0 1 1
0 1 1 0 1
1 1 1 1 0
0
输出样例 复制
4

说明

2
3
通过提交
时空限制10000ms/32mb
题目来源ZOJ Monthly, February 2003
评测方式在线评测
题目类型
难        度