import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; 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(); } boolean check(int[][] a) { int n=a.length; boolean ret=true; long sum=Arrays.stream(a[0]).sum(); for(int i=0;iN/2) { m[i+N][j]=m[i][j]; } if(i-center>N/2) { m[i-N][j]=m[i][j]; } if(center-j>N/2) { m[i][j+N]=m[i][j]; } if(j-center>N/2) { m[i][j-N]=m[i][j]; } } } } int[][] ret=new int[N][N]; for(int i=0;i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next());} }