import java.io.PrintStream; import java.util.Arrays; import java.util.Scanner; /** * Solution to Sculpture * * @author vanb */ public class sculpture_vanb { /** The Input. */ private static Scanner sc; /** The Output. */ private static PrintStream ps; /** * Do it. */ private void doit() { int r = sc.nextInt(); int c = sc.nextInt(); // Read the sculpture int sculpture[][] = new int[r][c]; for( int i=0; i1 ? " 0" : "" ); } // The last row will never have a drain if( r>1 ) for( int j=0; j1 ) ps.println(); } /** * The main method. * * @param args the arguments * @throws Exception the exception */ public static void main( String[] args ) throws Exception { sc = new Scanner( System.in ); ps = System.out; new sculpture_vanb().doit(); } }