//2004 - #4

import java.util.*;

public class HillsAndPlateaus {

  public static void main(String[] args){

    Scanner input = new Scanner(System.in);
    int times = input.nextInt();

    for(int i = 0; i < times; i++){
    
      int numElements = input.nextInt();
      ArrayList<Integer> sequence = new ArrayList<Integer>();
      for(int x = 0; x < numElements; x++){
        sequence.add(input.nextInt());
      }
      
      //Find ascents, descents, plateaus
    
    }
    
  }
  
}
