mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-09 16:18:49 +00:00
20 lines
304 B
C++
20 lines
304 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int t, n, a, ans;
|
|
|
|
int main() {
|
|
cin >> t;
|
|
while (t--) {
|
|
ans = 0;
|
|
cin >> n;
|
|
for (int i = 1; i <= n; i++) {
|
|
cin >> a;
|
|
ans = max(ans, a - i);
|
|
}
|
|
cout << ans << endl;
|
|
}
|
|
return 0;
|
|
}
|