// Arup Guha
// 11/17/2011
// This is an edited version of the clique class from the 
// class example written on 7/25/2011. It allows the creation
// of an instance of any problem that contains a graph and a 
// positive integer. Both instances of CLIQUE and VERTEX COVER
// are instances of graphk's.

class graphk {

	public boolean[][] graph;
	public int k;
	
	// Basic constructor.
	public graphk(boolean[][] g, int myK) {
		graph = g;
		k = myK;
	}
	
	// Returns a string representation of the graph which is
	// the number of vertices and k on one line, followed by
	// the adjacency matrix on the rest.
	public String toString() {
	
		String ans = graph.length + " " + k + "\n";
		for (int i=0; i<graph.length; i++) {
		
			for (int j=0; j<graph.length; j++) {
			
				if (graph[i][j])
					ans = ans + "1 ";
				else
					ans = ans + "0 ";
			}
			
			ans = ans + "\n";
		}
					
		return ans;
	}
	
}