#include <bits/stdc++.h>
using namespace std;
#define int long long
int N, h[100005];
set<int> s;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> N;
for (int i = 0; i < N; i++) {
cin >> h[i];
}
for (int i = 0; i < N; i++) {
s.insert(h[i] + i);
}
cout << s.size();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
Output isn't correct |
2 |
Incorrect |
5 ms |
384 KB |
Output isn't correct |
3 |
Incorrect |
6 ms |
512 KB |
Output isn't correct |
4 |
Incorrect |
6 ms |
640 KB |
Output isn't correct |
5 |
Incorrect |
14 ms |
1792 KB |
Output isn't correct |
6 |
Incorrect |
14 ms |
1792 KB |
Output isn't correct |
7 |
Incorrect |
12 ms |
1792 KB |
Output isn't correct |
8 |
Incorrect |
13 ms |
1792 KB |
Output isn't correct |
9 |
Incorrect |
13 ms |
1792 KB |
Output isn't correct |
10 |
Incorrect |
14 ms |
1792 KB |
Output isn't correct |