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: import java.util.*;
  import java.io.*;
  public class Sol{
   
  /*   
  ->check n=1, int overflow , array bounds , all possibilites(dont stuck on 1 approach)
  ->Problem = Observation(constraints(m<=n/3 or k<=min(100,n)) 
             + Thinking + Technique (seg_tree,binary lift,rmq,bipart,dp,connected comp etc)
  ->solve or leave it (-solution improves you in minimal way-)
  */
   
  public static void main (String []args)  
     throws IOException {
  //precomp();
  
  int times=ni();while(times-->0){solve();}out.close();}
  
  //all ai are distinct
  //error k=2 a=3 4 3 4  
  //      k=3 a=4 5 1 2 3 9 10 -> 1 2 3 | 4 5 | 9 10
  static void solve() throws IOException{  
       int n=ni();int k=ni();
       Pair p[]=new Pair[n];
       for(int i=0;i<n;i++){int a=ni();p[i]=new Pair(a,i);}
       int count=1;
       Arrays.sort(p,(o1,o2)->o1.id-o2.id );
  
       for(int i=1;i<n;i++){
          if(p[i].value!=p[i-1].value+1)count++;
       }
       if(count>k){out.println("No");}
       else {out.println("Yes");}
  
       return;
   }
  
  
  //-----------------Utility--------------------------------------------
  
  
  
  static int st[],lazy[];
  
  static void point_update(int i,int v){
      st[i]=v;int j=i/2;
      while(j>=1){
        st[j]=Math.min(st[2*j],st[2*j+1]);j/=2;
      }
   }
  
  static void prop(int i,int l,int r){
     if(l!=r)
     {lazy[2*i+1]+=lazy[i];lazy[2*i]+=lazy[i];}st[i]+=lazy[i];lazy[i]=0; 
   }
  
  static void update(int i,int l,int r,int L,int R,int v){
     prop(i,l,r);
     if(L>r || l>R)return;
     if(L<=l && R>=r){lazy[i]+=v;return;}
     int mid=(l+r)/2;
     update(2*i,l,mid,L,R,v);update(2*i+1,mid+1,r,L,R,v);
     st[i]=Math.min(st[2*i]+lazy[2*i],st[2*i+1]+lazy[2*i+1]);
     
   }
  
  static long gcd(long a,long b){if(b==0)return a; return gcd(b,a%b);}
   
  static int Max=Integer.MAX_VALUE; static long mod=1000000007;
   
  static int v(char c){return (int)(c-'a');}
   
  public static long power(long x, long y )
      {
          //0^0 = 1
          long res = 1L;
          x = x%mod;
          while(y > 0)
          {
              if((y&1)==1)
                  res = (res*x)%mod;
              y >>= 1;
              x = (x*x)%mod;
          }
          return res;
      }
   
  static class Pair implements Comparable<Pair>{
          int id;int value;Pair next;
          public Pair(int id,int value) {
           
            this.id=id;this.value=value;next=null;
          }
          @Override
          public int compareTo(Pair p){return Long.compare(value,p.value);}
      }
   
  //----------------------I/O---------------------------------------------
   
  static PrintWriter out=new PrintWriter(System.out);
  static Reader in=new Reader();
  
  static class Reader {
          final private int BUFFER_SIZE = 1 << 16;
          private DataInputStream din;
          private byte[] buffer;
          private int bufferPointer, bytesRead;
   
          public Reader()
          {
              din = new DataInputStream(System.in);
              buffer = new byte[BUFFER_SIZE];
              bufferPointer = bytesRead = 0;
          }
   
          public Reader(String file_name) throws IOException
          {
              din = new DataInputStream(
                  new FileInputStream(file_name));
              buffer = new byte[BUFFER_SIZE];
              bufferPointer = bytesRead = 0;
          }
   
          public String readLine() throws IOException
          {
              byte[] buf = new byte[64]; // line length
              int cnt = 0, c;
              while ((c = read()) != -1) {
                  if (c == '\n') {
                      if (cnt != 0) {
                          break;
                      }
                      else {
                          continue;
                      }
                  }
                  buf[cnt++] = (byte)c;
              }
              return new String(buf, 0, cnt);
          }
   
          public int nextInt() throws IOException
          {
              int ret = 0;
              byte c = read();
              while (c <= ' ') {
                  c = read();
              }
              boolean neg = (c == '-');
              if (neg)
                  c = read();
              do {
                  ret = ret * 10 + c - '0';
              } while ((c = read()) >= '0' && c <= '9');
   
              if (neg)
                  return -ret;
              return ret;
          }
   
          public long nextLong() throws IOException
          {
              long ret = 0;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();
              do {
                  ret = ret * 10 + c - '0';
              } while ((c = read()) >= '0' && c <= '9');
              if (neg)
                  return -ret;
              return ret;
          }
   
          public double nextDouble() throws IOException
          {
              double ret = 0, div = 1;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();
   
              do {
                  ret = ret * 10 + c - '0';
              } while ((c = read()) >= '0' && c <= '9');
   
              if (c == '.') {
                  while ((c = read()) >= '0' && c <= '9') {
                      ret += (c - '0') / (div *= 10);
                  }
              }
   
              if (neg)
                  return -ret;
              return ret;
          }
   
          private void fillBuffer() throws IOException
          {
              bytesRead = din.read(buffer, bufferPointer = 0,
                                   BUFFER_SIZE);
              if (bytesRead == -1)
                  buffer[0] = -1;
          }
   
          private byte read() throws IOException
          {
              if (bufferPointer == bytesRead)
                  fillBuffer();
              return buffer[bufferPointer++];
          }
   
          public void close() throws IOException
          {
              if (din == null)
                  return;
              din.close();
          }
      }
  static int ni() throws IOException{return in.nextInt();} 
  static long nl() throws IOException{return in.nextLong();}
  static double nd() throws IOException{return in.nextDouble();}
  static String ns() throws IOException{return in.readLine();}
  //---------------------I/O------------------------------------------------- 
  }