//No.90 品物の並び替え import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No90 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { int n = in.nextInt(); int m = in.nextInt(); int[] a = new int[n]; for (int i=0; i=0 && a[i]>=a[i+1]; i--); if (i == -1) return false; for (j=i+1; j