CliqueA bunch of people on Facebook would like to find out the largest clique among them.
(Maybe this will be the next facebook application?)
A clique is defined as a group of people where everyone is friends with everyone else.
Given a list of friends (friendship works both ways), your job is to output the size of this clique.
For the sake of privacy (and your convenience), we have replaced the names of the people with numbers.
InputNumber of people, 1 ≤ N ≤ 32
Number of friendships, 1 ≤ M ≤ N*(N-1)/2
M lines, each with 2 numbers 1 ≤ a, b ≤ N meaning that a and b are friends.
There will be no duplicate edges.
NOTE: 50% of test cases will have N ≤ 24.
OutputThe size of the maximum clique.
Friends 2,3,4,5 form the largest clique.
Point Value: 15 (partial)
Time Limit: 1.00s
Memory Limit: 64M
Added: Sep 24, 2008
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3