import java.util.*; import java.io.*; // public class Solution class Solution { static BufferedReader br; static String nextIntBuffer[]; static int nextIntBase; static int nextInt() throws IOException { return Integer.parseInt(next()); } static long nextLong() throws IOException { return Long.parseLong(next()); } static String next() throws IOException { if(nextIntBase>=nextIntBuffer.length) { nextIntBase =0; nextIntBuffer = br.readLine().split(" "); } return nextIntBuffer[nextIntBase++]; } public static ,T2 extends Comparable > Pair mp(T1 a,T2 b) { return new Pair(a,b); } public static void main(String[] args) throws IOException { br=new BufferedReader(new InputStreamReader(System.in)); nextIntBuffer = new String[0]; int n=nextInt(); int k1=nextInt(); int[] a=new int[n]; for (int i=0;i=k1) ans[i]=Math.max(ans[i],k-j+1); for(int i=0;i, T2 extends Comparable > implements Comparable > { T1 a; T2 b; public Pair(T1 x, T2 y) { a = x; b = y; } @Override public int compareTo(Pair other) { int comp1 = a.compareTo(other.a); if(comp1!=0) return comp1; return b.compareTo(other.b); } }