#include <bits/stdc++.h>
#define GOOD_LUCK ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define int long long
#define endl "\n"
#define ff first
#define ss second
#define pb push_back
#define all(v) v.begin(), v.end()
using namespace std;
constexpr int MAX = 2e+5 + 1, INF = 2e+16, MOD = 1e+9 + 7, K = 31;
void _() {
int n;
cin >> n;
vector <int> v(n);
for (int &i : v) cin >> i;
int x=1;
for (int i = 1; i < n; i++) {
if (v[i] < v[i-1]) x++;
}
cout << x;
}
signed main() {
GOOD_LUCK
int tests=1;
cin >> tests;
for (int i=1; i <= tests; i++) {
_();
cout << endl;
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |