import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; public class Main implements Runnable{ public static void main(String[] args) { new Thread(null,new Main(), "" ,Runtime.getRuntime().maxMemory()).start(); } int num(int i,int j,int len,int[][][] cnt,int H,int W,int K) { int sum=0; int INF=Integer.MAX_VALUE/3; for(int v=0;v<26;++v) { int p=i+len-1; int q=j+len-1; int r=i-1; int t=j-1; int a=(p>H||q>W)?INF:(cnt[v][p][q]-cnt[v][r][q]-cnt[v][p][t]+cnt[v][r][t]); if(a==INF) sum=INF; else if(a>0) ++sum; if(sum>K+1)break; } return sum; } public void run() { FastScanner sc=new FastScanner(); int H=sc.nextInt(); int W=sc.nextInt(); int K=sc.nextInt(); char[][] map=new char[H][W]; int[][][] cnt=new int[26][H+2][W+2]; for(int i=0;i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} }