#include using namespace std; using ll = long long; void solve() { int n; cin>>n; int best,worst,ct=0; for(int i=0; i>x; if(i==0) best=worst=x; if(xbest) { ct++; best=x; } } cout<> TC; //cin.ignore(); while (TC--) solve(); }