import java.io.*; import java.util.*; import java.awt.geom.*; /** * Solution to Blur * * @author vanb */ public class blur_vanb { public Scanner sc; public PrintStream ps; /** * Driver. * @throws Exception */ public void doit() throws Exception { sc = new Scanner( System.in ); ps = System.out; int w = sc.nextInt(); int h = sc.nextInt(); int b = sc.nextInt(); // We're going to store b+1 images, one for each blurring actions. // It's more memory efficient to just keep 2 and swap them, but // that requires more programming, and the numbers are small enough // that it shouldnn't be a problem. int image[][][] = new int[h][w][b+1]; for( int i=0; i0; k-- ) for( int i=0; i colors = new HashSet(); for( int i=0; i