mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-10 05:58:48 +00:00
parent
7896bca156
commit
fa0a2c8f33
19
CodeForces/1604/A/A.cpp
Normal file
19
CodeForces/1604/A/A.cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user