description: Moamen has an array of n distinct integers. He wants to sort that array in non-decreasing order by doing the following operations in order exactly once:
  
    1. Split the array into exactly k non-empty subarrays such that each element belongs to exactly one subarray. 
    2. Reorder these subarrays arbitrary. 
    3. Merge the subarrays in their new order. 
  
  
  
  A sequence a is a subarray of a sequence b if a can be obtained from b by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end.
  
  Can you tell Moamen if there is a way to sort the array in non-decreasing order using the operations written above?
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 10^3) — the number of test cases. The description of the test cases follows.
  
  The first line of each test case contains two integers n and k (1 ≤ k ≤ n ≤ 10^5).
  
  The second line contains n integers a_1, a_2, …, a_n (0 ≤ |a_i| ≤ 10^9). It is guaranteed that all numbers are distinct.
  
  It is guaranteed that the sum of n over all test cases does not exceed 3⋅10^5.
  
  Output
  
  For each test case, you should output a single string.
  
  If Moamen can sort the array in non-decreasing order, output "YES" (without quotes). Otherwise, output "NO" (without quotes).
  
  You can print each letter of "YES" and "NO" in any case (upper or lower).
  
  Example
  
  Input
  
  
  3
  5 4
  6 3 4 2 1
  4 2
  1 -4 0 -2
  5 1
  1 2 3 4 5
  
  
  Output
  
  
  Yes
  No
  Yes
  
  Note
  
  In the first test case, a = [6, 3, 4, 2, 1], and k = 4, so we can do the operations as follows: 
  
    1. Split a into \{ [6], [3, 4], [2], [1] \}. 
    2. Reorder them: \{ [1], [2], [3,4], [6] \}. 
    3. Merge them: [1, 2, 3, 4, 6], so now the array is sorted. 
  
  
  
  In the second test case, there is no way to sort the array by splitting it into only 2 subarrays.
  
  As an example, if we split it into \{ [1, -4], [0, -2] \}, we can reorder them into \{ [1, -4], [0, -2] \} or \{ [0, -2], [1, -4] \}. However, after merging the subarrays, it is impossible to get a sorted array.
solution: 					/*
  					TO LEARN
  			
  					2-euler tour
  				
  					*/
  					/*
  					TO SOLVE 
  					codeforces 722 kavi on pairing duty
  					*/
  					/*
  					bit manipulation shit
  					1-Computer Systems: A Programmer's Perspective
  					2-hacker's delight
  					3-(02-03-bits-ints)
  					4-machine-basics
  					5-Bits Manipulation tutorialspoint
  					*/
  					/*
  					TO WATCH
  					
  					*/
  					            import java.util.*;
  							    import java.math.*;
  							    import java.io.*; 
  							    import java.util.stream.Collectors;
  
  							       public class A{
  					            static FastScanner scan=new FastScanner();
  							     public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
  static class comp implements Comparator<ArrayList<Integer>> {
     
      public int compare(ArrayList<Integer> a, ArrayList<Integer>b)
      {
          return a.get(0)-b.get(0);
      }
  }
  				public static void main(String[] args)  throws Exception 
  					      {
  					 /*
  					 very important tip 
  					 just fucking think backwards once in your shitty life
  					 */
  
  								///scan=new FastScanner("cownomics.in");
  							//out = new PrintWriter("cownomics.out");
  							 
  							 							 /*
  							 READING 
  						
  							 3-Introduction to DP with Bitmasking codefoces
  							 4-Bit Manipulation hackerearth
  							 5-read more about mobious and inculsion-exclusion 
  							 */
  							 
  							    int tt=1;
  
  				tt=scan.nextInt();
  						 outer:while(tt-->0)
  							    {
  							    	int n=scan.nextInt(),k=scan.nextInt();
  							    	int arr[]=new int[n];
  							    	
  							    	int tmp[]=new int[n];
  							    	Map<Integer,Integer>map=new HashMap<Integer,Integer>();
  							    	for(int i=0;i<n;i++){
  							    	arr[i]=scan.nextInt();
  							    	tmp[i]=arr[i];
  							    	map.put(arr[i],i);
  							    }
  							   
  							    sort(tmp);
  							    int cur=1;
  
  							   int idx=map.get(tmp[0]);
  							   int i=0;
  							   while(i!=n-1)
  							   {
  							   	if(map.get(tmp[i+1])==map.get(tmp[i])+1)
  							   	{
  
  							   	}
  							   	else cur++;
  							   	i++;
  							   }
  							 //  out.println(cur);
  							    if(k>=cur)
  							    {
  							    	out.println("YES");
  							    }
  							    else out.println("NO");
  							    
  							    
  							    
  
   }
  
  							
  
  	out.close();
  				}
  	    
  					static	class SegmentTreeRMQ
  {
      int st[]; //array to store segment tree
   
      // A utility function to get minimum of two numbers
      int minVal(int x, int y) {
          return (x > y) ? x : y;
      }
   
      // A utility function to get the middle index from corner
      // indexes.
      int getMid(int s, int e) {
          return s + (e - s) / 2;
      }
   
      /*  A recursive function to get the minimum value in a given
          range of array indexes. The following are parameters for
          this function.
   
          st    --> Pointer to segment tree
          index --> Index of current node in the segment tree. Initially
                     0 is passed as root is always at index 0
          ss & se  --> Starting and ending indexes of the segment
                       represented by current node, i.e., st[index]
          qs & qe  --> Starting and ending indexes of query range */
      int RMQUtil(int ss, int se, int qs, int qe, int index)
      {
          // If segment of this node is a part of given range, then
          // return the min of the segment
          if (qs <= ss && qe >= se)
              return st[index];
   
          // If segment of this node is outside the given range
          if (se < qs || ss > qe)
              return Integer.MIN_VALUE;
   
          // If a part of this segment overlaps with the given range
          int mid = getMid(ss, se);
          return minVal(RMQUtil(ss, mid, qs, qe, 2 * index + 1),
                  RMQUtil(mid + 1, se, qs, qe, 2 * index + 2));
      }
   
      // Return minimum of elements in range from index qs (query
      // start) to qe (query end).  It mainly uses RMQUtil()
      int RMQ(int n, int qs, int qe)
      {
          // Check for erroneous input values
          if (qs < 0 || qe > n - 1 || qs > qe) {
            //  System.out.println("Invalid Input");
              return -1;
          }
   
          return RMQUtil(0, n - 1, qs, qe, 0);
      }
   
      // A recursive function that constructs Segment Tree for
      // array[ss..se]. si is index of current node in segment tree st
      int constructSTUtil(int arr[], int ss, int se, int si)
      {
          // If there is one element in array, store it in current
          //  node of segment tree and return
          if (ss == se) {
              st[si] = arr[ss];
              return arr[ss];
          }
   
          // If there are more than one elements, then recur for left and
          // right subtrees and store the minimum of two values in this node
          int mid = getMid(ss, se);
          st[si] = minVal(constructSTUtil(arr, ss, mid, si * 2 + 1),
                  constructSTUtil(arr, mid + 1, se, si * 2 + 2));
          return st[si];
      }
   
      /* Function to construct segment tree from given array. This function
         allocates memory for segment tree and calls constructSTUtil() to
         fill the allocated memory */
      void constructST(int arr[], int n)
      {
          // Allocate memory for segment tree
   
          //Height of segment tree
          int x = (int) (Math.ceil(Math.log(n) / Math.log(2)));
   
          //Maximum size of segment tree
          int max_size = 2 * (int) Math.pow(2, x) - 1;
          st = new int[max_size]; // allocate memory
   
          // Fill the allocated memory st
          constructSTUtil(arr, 0, n - 1, 0);
      }}
   
  							   
  							     static long binexp(long a,long n)
  							    {
  							        if(n==0)
  							            return 1;
  							        long res=binexp(a,n/2);
  							        if(n%2==1)
  							            return res*res*a;
  							        else 
  							            return res*res;
  							    }
  							     
  							    static long powMod(long base, long exp, long mod) {
  							           if (base == 0 || base == 1) return base;
  							           if (exp == 0) return 1;
  							           if (exp == 1) return (base % mod+mod)%mod;
  							           long R = (powMod(base, exp/2, mod) % mod+mod)%mod;
  							           R *= R;
  							           R %= mod;
  							           if ((exp & 1) == 1) {
  							               return (base * R % mod+mod)%mod;
  							           }
  							           else return (R %mod+mod)%mod;
  							       }
  							    static double dis(double x1,double y1,double x2,double y2)
  							    {
  							        return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
  							    }
  							    static long mod(long x,long y)
  							        {
  							            if(x<0)
  							                x=x+(-x/y+1)*y;
  							            return x%y;
  							        }
  							     public static  long pow(long b, long e) {
  							                long r = 1;
  							                while (e > 0) {
  							                    if (e % 2 == 1) r = r * b ;
  							                    b = b * b;
  							                    e >>= 1;
  							                }
  							                return r;
  							            }
  							    private static void sort(int[] arr) {
  							            List<Integer> list = new ArrayList<>();
  							            for (int object : arr) list.add(object);
  							            Collections.sort(list);
  							        //Collections.reverse(list);
  							            for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
  							        }
  							    private static void sort2(long[] arr) {
  							            List<Long> list = new ArrayList<>();
  							            for (Long object : arr) list.add(object);
  							            Collections.sort(list);
  							        Collections.reverse(list);
  							            for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
  							        }
  							     static class FastScanner
  					{
  					    private int BS = 1 << 16;
  					    private char NC = (char) 0;
  					    private byte[] buf = new byte[BS];
  					    private int bId = 0, size = 0;
  					    private char c = NC;
  					    private double cnt = 1;
  					    private BufferedInputStream in;
  					 
  					    public FastScanner() {
  					        in = new BufferedInputStream(System.in, BS);
  					    }
  					 
  					    public FastScanner(String s) {
  					        try {
  					            in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
  					        } catch (Exception e) {
  					            in = new BufferedInputStream(System.in, BS);
  					        }
  					    }
  					 
  					    private char getChar() {
  					        while (bId == size) {
  					            try {
  					                size = in.read(buf);
  					            } catch (Exception e) {
  					                return NC;
  					            }
  					            if (size == -1) return NC;
  					            bId = 0;
  					        }
  					        return (char) buf[bId++];
  					    }
  					 
  					    public int nextInt() {
  					        return (int) nextLong();
  					    }
  					 
  					    public int[] nextInts(int N) {
  					        int[] res = new int[N];
  					        for (int i = 0; i < N; i++) {
  					            res[i] = (int) nextLong();
  					        }
  					        return res;
  					    }
  					 
  					    public long[] nextLongs(int N) {
  					        long[] res = new long[N];
  					        for (int i = 0; i < N; i++) {
  					            res[i] = nextLong();
  					        }
  					        return res;
  					    }
  					 
  					    public long nextLong() {
  					        cnt = 1;
  					        boolean neg = false;
  					        if (c == NC) c = getChar();
  					        for (; (c < '0' || c > '9'); c = getChar()) {
  					            if (c == '-') neg = true;
  					        }
  					        long res = 0;
  					        for (; c >= '0' && c <= '9'; c = getChar()) {
  					            res = (res << 3) + (res << 1) + c - '0';
  					            cnt *= 10;
  					        }
  					        return neg ? -res : res;
  					    }
  					 
  					    public double nextDouble() {
  					        double cur = nextLong();
  					        return c != '.' ? cur : cur + nextLong() / cnt;
  					    }
  					 
  					    public double[] nextDoubles(int N) {
  					        double[] res = new double[N];
  					        for (int i = 0; i < N; i++) {
  					            res[i] = nextDouble();
  					        }
  					        return res;
  					    }
  					 
  					    public String next() {
  					        StringBuilder res = new StringBuilder();
  					        while (c <= 32) c = getChar();
  					        while (c > 32) {
  					            res.append(c);
  					            c = getChar();
  					        }
  					        return res.toString();
  					    }
  					 
  					    public String nextLine() {
  					        StringBuilder res = new StringBuilder();
  					        while (c <= 32) c = getChar();
  					        while (c != '\n') {
  					            res.append(c);
  					            c = getChar();
  					        }
  					        return res.toString();
  					    }
  					 
  					    public boolean hasNext() {
  					        if (c > 32) return true;
  					        while (true) {
  					            c = getChar();
  					            if (c == NC) return false;
  					            else if (c > 32) return true;
  					        }
  					    }
  					}
  
  							     static class Pair implements Comparable<Pair>{
  							            public long x, y,z;
  							            public Pair(long x1, long y1,long z1) {
  							                x=x1;
  							                y=y1;
  							                z=z1;
  							            }
  							             public Pair(long x1, long y1) {
  							                x=x1;
  							                y=y1;
  							    
  							            }
  							            
  							            @Override
  							            public int hashCode() {
  							                return (int)(x + 31 * y);
  							            }
  							            public String toString() {
  							                return x + " " + y+" "+z;
  							            }
  							            @Override
  							            public boolean equals(Object o){
  							                if (o == this) return true;
  							                if (o.getClass() != getClass()) return false;
  							                Pair t = (Pair)o;
  							                return t.x == x && t.y == y&&t.z==z;
  							            }
  							    public int compareTo(Pair o)
  							    {
  							   if(y==o.y)
  							   return (int)(o.x-x); 	
  							  
  							    	return (int)(y-o.y);
  							     
  							        }
  							     
  							    }
  							}
  							    
  							   
  
  							     
  