Problems

# Maximum Clique

# Maximum Clique

Given a graph **G**(**V**, **E**), a clique is a sub-graph **g**(**v**, **e**), so that for all vertex pairs `v`

, _{1}`v`

in _{2}**v**, there exists an edge (`v`

, _{1}`v`

) in _{2}**e**. Maximum clique is the clique that has maximum number of vertex.

#### Input

Consists of multiple tests. The first line of each test case contains the number of vertices **n** (**1** < **n** ≤ **50**). The following **n** lines has **n** numbers **0** or **1** each, indicating whether an edge exists between **i** (line number) and **j** (column number). The last line contains **n** = **0** and must not be processed.

#### Output

For each test case print on a separate line the number of vertices in maximum clique.

Input example #1

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

Output example #1

4