#K10861. Largest Clique
Largest Clique
Largest Clique
You are given n students and m pairs of friendships among them. Two students are friends if there is a direct friendship connection. A clique is a subset of students such that every two distinct students in the subset are friends. In other words, for a clique \( S \), for every two distinct students \( i, j \in S \), there exists an edge between \( i \) and \( j \). Your task is to compute the size of the largest clique in the friendship network.
Input Format: The first line contains two integers \( n \) and \( m \). The following \( m \) lines each contain two integers \( u \) and \( v \), representing that student \( u \) and student \( v \) are friends.
Note: It is guaranteed that the data set is small enough so that a brute-force solution will pass.
inputFormat
The first line contains two integers \( n \) and \( m \) separated by a space. Each of the next \( m \) lines contains two integers \( u \) and \( v \) indicating a friendship between student \( u \) and student \( v \).
outputFormat
Output a single integer, which is the maximum size of a clique in the friendship network.
## sample5 6
1 2
2 3
3 4
4 1
1 3
2 4
4