Problem about Cliques
Medium
Execution time limit is 2 seconds
Runtime memory usage limit is 256 megabytes
Given an undirected, unweighted graph, your task is to determine the number of subcliques within the graph. A subclique is defined as a subgraph that forms a complete graph. In a complete graph with V vertices, there are exactly 2^V subcliques. Conversely, in an empty graph with V vertices, there are exactly V+1 subcliques.
Input
The input begins with the integer V (1 ≤ V ≤ 60), representing the number of vertices in the graph.
Following this, the graph's adjacency matrix is provided over V rows. In this matrix, a 0 signifies no edge between vertices, while a 1 indicates an edge is present. The main diagonal of the matrix always contains zeros, and the matrix is symmetric.
Output
Output the total number of subcliques in the given graph.
Examples
Input #1
Answer #1
Submissions 114
Acceptance rate 14%